Angela Lang/CNET

More than 225 US mayors have signed on to a resolution not to pay ransoms to hackers. It's a collective stand against the ransomware attacks that have crippled city government computer systems in recent years.

The resolution was adopted at the US Conference of Mayors annual meeting, which took place late June and early July in Honolulu. "The United States Conference of Mayors stands united against paying ransoms in the event of an IT security breach," the resolution reads.

This could give city leaders across the US some leverage against hackers. The 227 mayors who attended the meeting agreed to adopt the resolution, but the US Conference of Mayors represents more than 1,400 cities with populations over 30,000.

Ransomware attacks use malware to lock out users unless the hackers get paid, usually with bitcoin. Cities have been picked off one by one, with seemingly little recourse. They've been prime targets for ransomware attacks because cities can't afford to let certain services remain frozen.

According to the resolution, there have been 22 ransomware attacks on city, county and state governments so far this year. Hackers paralyzed government computers in Albany, New York, in April. Then in June, hackers targeted two Florida cities: Lake City and Rivera Beach. The city councils in both Florida cities agreed to pay ransoms that added up to more than $1 million.