While two Florida cities have now paid a ransom to regain control of their hacked computer systems, the city of Baltimore is taking a different approach.

Baltimore officials this week approved $10 million of emergency funding to recover from a similar attack after refusing to pay an $80,000 ransom at the advice of law enforcement authorities.

Cyberattacks immobilized some of the city's systems almost two months ago, WBAL reported, but services such as water billing are still offline. The total cost of responding to the hack may hit $18 million, the city's budget office estimated.

Officials in Lake City, Florida, meanwhile, decided to pay hackers a ransom of 42 bitcoins, or roughly $426,000.

'Soft targets':Beleaguered Baltimore still reeling from a cyberattack. And that's just its latest woe.

"I believe this was the cheapest alternative for the city," Lake City Mayor Joe Helfenberger told WTLV-TV this week.

The hack this month infected 16 terabytes of data, and even after paying the ransom, the city may not be able to recover all of it, WTLV-TV reported. The city's insurance will cover $10,000 of the costs, amounting to about 2.3% of the ransom.

"This has been crippling," Helfenberger said.

The cities are not alone. There have been more than 170 ransomware attacks on U.S. state and local governments since November 2013, according to the technology company Recorded Future.

Lee McKnight, an associate professor at Syracuse University’s School of Information Studies and an expert on cybersecurity, previously told USA TODAY that cyberattacks on cities are becoming more common.

Traveling threats:Hackers are trying to steal your vacation. Here's how to stop them

“Unfortunately, it happens again and again to municipal systems that don’t have all the latest software, the latest protections or the highest-paid IT staffs either,” McKnight said. “If it can happen to Atlanta, Baltimore shouldn’t be embarrassed.’’

Atlanta had more than a third of its systems paralyzed by a March 2018 ransomware attack. Recovery has taken more than a year and costs have been pegged at $17 million.

Last week, another Florida city, Riviera Beach, paid more than $600,000 in ransom to hackers. The FBI does not support agreeing to hackers' demands, but said 1,493 ransomware attacks were reported last year, with victims paying $3.6 million to hackers – about $2,400 per attack.

Contributing: Jorge L. Ortiz, USA TODAY; The Associated Press