Tiny Ely in northern Minnesota — population 3,400 — decided to send nearly 30 percent of its police department to the Twin Cities to lend a hand with security for Super Bowl LII. That’s two of the town’s seven officers.

“You start thinking about your guys, they work in this little small town, it would be a different experience for them,” said Ely Police Chief John Lahtonen.

Ely’s finest will be joining the largest security detail ever deployed in Minnesota — and in Super Bowl history — an enormously complex effort involving hundreds of officers from 60 police departments across the state, 40 federal agencies and related offices, 400 members of the Minnesota National Guard, and private contractors.

It took two years to plan security for Super Bowl LII, where the New England Patriots and Philadelphia Eagles will face off in U.S. Bank Stadium Feb. 4, as well as the phalanx of parties and events leading up to the big day. The game itself is expected to draw more than 100 million television viewers.

About $5 million has been set aside by the Minnesota Super Bowl Host Committee for public safety, public works and other costs associated with the game and festivities. The committee is also reimbursing the state $1.08 million for deployment of the National Guard. “Our goal is to keep the city open, vibrant and safe during the Super Bowl,” said Minneapolis Police Chief Medaria Arradondo, whose department is leading the security effort.

The Department of Homeland Security attaches a Level 1 “special event assessment rating” to the event, the highest security designation available, because of the game’s broad national and international reach. “This is a high-profile event with a lot of visibility, not just in the United States, but all over the world,” said Tim Bradley, a security expert with Florida-based IMG GlobalSecur. “So it’s an attractive target [for terrorists] in that sense. However, the amount of security makes it less attractive for someone who wants to launch an attack.”

Law-enforcement officials are circumspect when asked to detail their efforts. The challenge ranges from thwarting potential terrorist attacks to reining in fanatical Patriots and Eagles fans.

“Part of the planning is crowd management and addressing behaviors of all types of individuals,” said Minneapolis Police spokesman John Elder. “This includes the over-jubilant and unruly.”

Anyone visiting downtown Minneapolis can detect hints of beefed-up security: Streets have been closed, a chain-link fence and concrete barriers now surround the Downtown East park near the stadium, part of its secure perimeter. Parking garages have some exits blocked. And in days to come, more and more officers will take to the streets.

Unseen security tools likely include license-plate readers, social media tracking of possible threats, radiation detectors and hundreds of temporary surveillance cameras to supplement existing public and private cameras, security experts say. From an emergency management perspective, mass fatality plans will be similar to those used for plane crashes, according to a Super Bowl subcommittee report, first reported by Public Record Media.

Recently, Minneapolis City Council Member Steve Fletcher asked Arradondo whether his Downtown East neighborhood will be “a really fun party” or a “military occupation.” The chief assured him it wouldn’t be the latter.

A command center to coordinate security efforts has been set up near U.S. Bank Stadium, the location of which has not been divulged. It has even been scrubbed from public documents for security reasons.

Halo Stafford, senior business manager of the Edition apartments hemming the Downtown East park, has hired a 10-member team to check people entering the 195-unit complex. Edition has also limited the number of people permitted in the complex (one guest for every 200 square feet), denied requests for extra keys, and is closely watching short-term rental sites like Airbnb to make sure none of the units is being rented to third parties for the event.

“It has been very pricey doing all of this to keep residents safe,” Stafford said, noting some residents have grumbled about the added security. U.S. Bank Stadium is unique because of its urban setting, unlike suburban Super Bowl venues at previous sites, such as Houston, Phoenix and Santa Clara, Calif.

But every site has its own challenges, said Matt Slinkard, executive assistant chief of the Houston Police Department. “Houston is 640 square miles. The city is very spread out and we had events happening in an area that is very large,” Slinkard said. “That was somewhat of a challenge.”

Less challenging was mustering law enforcement to help: Houston has some 5,200 officers, far more than Minneapolis’ head count of 840. Houston got help from federal authorities, too. “It’s a big stage and no one jurisdiction can handle it. You have to be flexible to respond to the unforeseen, like a large party that may come up at the last minute,” or traffic snarls.

All told, security in Houston cost $5.5 million, plus an additional $1.6 million for security at NRG Stadium.

Metro Transit officials have dubbed the event “the first transit Super Bowl” — the host committee hopes 20,000 of the 67,000 fans attending the game will take public transportation.

Providing fans access to transit while maintaining service to workday passengers has proved challenging for Metro Transit, however. The game-day plan calls for some 15,000 ticket holders to be screened at the Mall of America before they board the Blue Line light rail. The train will proceed to the stadium, but no one else will be permitted to board. A similar system will be used on the Green Line, where Super Bowl ticket holders will be screened at the Stadium Village stop at the University of Minnesota. The cost: $30 a ticket.

Regular transit riders will take replacement buses until LRT gets back on track Sunday night after the game. This plan caused a storm of controversy when announced last fall. Some transit passengers questioned why wealthy football patrons get preferential treatment.

All told, the Metro Transit Police Department expects to incur $418,000 in Super Bowl-related security costs — all of which will be repaid from security grants.

Metro Transit Deputy Chief of Police A.J. Olson told the Metropolitan Council he has confidence in the security plan. Law enforcement has “the ability when it really matters most to take all of our huge egos … and tuck them in a drawer and get the job done. We don’t worry too much about who gets the credit or blame,” Olson said.

In recent years, lone-wolf attacks, such as the bombing at the Boston Marathon in 2013, and deadly vehicle-ramming attacks, such as those in Nice, France, and New York City, have increased.

These attacks involve “turning an easily acquired vehicle into a weapon to kill or maim in places where citizens presume they are safe. No firearms have to be acquired or bombs made,” said Brian Michael Jenkins, of the Mineta National Transportation Safety and Security Center. But, he notes, vehicle rammings are not as lethal as might be thought, and can be thwarted to some degree by bollards and extra security.

“Of all the risks we face in everyday life, being killed by a terrorist under any circumstances, we’re talking lottery odds,” Jenkins said.