Anonymous hackers have brought the US city of Baltimore to its knees by seizing control of government computers, demanding bitcoin in return for releasing their hold over the systems.

A ransomware attack was discovered on May 7, with the city taking down online systems and services in an effort to contain it.

While the attack took place two weeks ago, the city's mayor, Bernard Young, is refusing to pay the requested sum, leaving officials unable to process parking tickets among other administrative functions.

He warned that it could take months for normal service to be resumed.

"Like any large enterprise, we have thousands of systems and applications. Our focus is getting critical services back online, and doing so in a manner that ensures we keep security as one of our top priorities throughout the process," Young said in a statement.

The city's emergency services have not been affected.

The hackers demanded 13 bitcoins — worth around €89,660 — to remove the file-locking virus, according to a ransom note obtained by the Baltimore Sun.

"We’ve (been) watching you for days and we’ve worked on your systems to gain full access to your company and bypass all of your protections," it read. "We won’t talk more, all we know is MONEY! … Hurry up! Tik Tak, Tik Tak, Tik Tak!"

The city remained unable to send or receive emails at the time of writing.

A similar cyber attack hit Atlanta last year, according to NBC, costing millions to recover damage, while Greenville in North Carolina was targetted in April.

As many as 25 local governments have been attacked by hackers this year, the media added, citing analysts.