Three weeks ago, a debilitating digital virus spread quickly in computer networks at three Southern California hospitals owned by Prime Healthcare Services, encrypting medical and other data so it was impossible to access.

Using a pop-up window, unidentified hackers demanded about $17,000 in the hard-to-trace cybercurrency called bitcoin for the digital key to unlock the data.

The attempted extortion by criminal hackers was the latest case of what the FBI says is a fast-growing threat and law enforcement agencies are a favorite target.

In March 2015, for example, the Lincoln County Sheriff's Department in coastal Maine paid about $350 in bitcoin for the key to its encrypted data after a malware attack. After the data was unlocked, Western Union reimbursed the county for the ransom payment, according to a county official who described the transaction, the Los Angeles Times reports.

That followed similar reported attacks on law enforcement in Tewksbury, Mass.; Midlothian, Ill.; Dickson County, Tenn.; Collinville, Ala.; and Durham, N.H. Some police chiefs refused to pay, saying they had backed up their data or it wasn't crucial.

But if this happens to your agency, don't expect the ransom to be $350. So-called ransomware attacks have surged so sharply that the FBI says hacking victims in the United States have paid more than $209 million in ransom payments in the first three months of this year, compared with $25 million in all of 2015. The FBI has not reported any arrests.

Experts say agencies should train employees not to open digital attachments or to click on unfamiliar weblinks in emails that might contain viruses or other malware. They also should back up critical data and use up-to-date virus detection software.