ST. PETERSBURG — Electronic frisking of fans will soon join hot dogs and beer as a regular part of the game-day experience at Tropicana Field.

Major League Baseball has told its 30 teams, including the Tampa Bay Rays, they must screen fans entering stadiums using either hand-held metal detectors or by adding walk-through magnetometers, similar to those used at airport departure gates.

The security is in addition to bag checking, already uniform at baseball games.

Teams have until 2015 Opening Day to make the changes, but may begin as soon as this year.

Rays officials said they do not yet know the cost of the extra security, but said the team and not St. Petersburg, which owns Tropicana Field, will pick up the tab. They hope to purchase a system that can screen each fan in less than 30 seconds to avoid turnstile delays.

“We want to do what is required by MLB in the most efficient manner that will be the least intrusive for our fans, and that’s what we are discussing now,” said Rick Vaughn, a spokesman for the Rays.

The focus on security at sporting events heightened in the wake of the bomb attack at the Boston Marathon that killed three people and injured more than 260. The decision to beef up security at baseball games was made after “long-standing conversations” between MLB, teams and the Department of Homeland Security, according to MLB spokesman Michael Teevan.

MLB’s security department is working with CEIA, a manufacturer of walk-through metal detectors, and GSIS, a security procedures consultant, to help clubs revise their methods and train staff.

If the Rays decide to install magnetometers, they would have to get permission from the city of St. Petersburg, and it raises the question of who would pay and own the equipment. The city’s contract with the Rays details the city will make regular stadium improvements with money from a capital repair fund made up of the first $250,000 of the city’s share of ticket fees and revenue from naming rights. The account has a balance of roughly $2.3 million.

City leaders recently agreed to spend $1.3 million of that money on stadium upgrades, including a new 360-degree walkway.

“If there is equipment or improvements needed, very likely they would come and have a discussion with the city,” said Joe Zeoli, managing director for city development administration. “If they have to make any modifications to the building that would be something the city would have to say ‘yay’ or ‘nay’ to.”

Fans in the Bay area have already had to adapt to extra screening at sports events. Fans are wanded at Raymond James Stadium for Tampa Bay Buccaneers games, although not for other events held there, including University of South Florida football games.

Fans at Tampa Bay Lightning games must walk through metal detectors and are prohibited from carrying large bags or backpacks into the arena.

The Rays are still looking into whether they will introduce screening for the 2014 season.

“It’s still early in the process, but we are always concerned with providing the best experience for our fans,” Vaughn said.