A Massachusetts police department was forced to pay a $500 Bitcoin ransom to hackers who encrypted vital records on their computer network.

Tewksbury Police Department came under attack by criminals who infected their network with a form of Internet malware in December before demanding money to decrypt the files.

The program called CryptoLocker infects through an e-mail and then scrambles the data on the computer. It caused police systems to be down between four and five days, according to Tewksbury Town Crier.

Tewksbury Police Department (above) came under attack by hackers which encrypted their computers' files using a malware program called CryptoLocker. They were forced to pay a $500 in Bitcoinransom

The only files that were not corrupted were 18 months old, so cops were left paying the ransom in the untraceable digital currency or they risked losing the data forever, according to the Boston Globe.

'Nobody wants to negotiate with terrorists. Nobody wants to pay terrorists,' Police Chief Timothy Sheehan told the Town Crier. 'We did everything we possibly could.

'It was an eye opening experience, I can tell you right now. It made you feel that you lost control of everything. Paying the Bitcoin ransom was the last resort.'

Police Chief Timothy Sheehan said: 'It made you feel that you lost control of everything. Paying the Bitcoin ransom was the last resort'

The department was hit with the ransomware on December 7 when access to the infected computers became restricted and a payment was required to recover the files. Police became aware of the malware infection the following day.

Computers were hit with a more recent form of CryptoLocker that authorities did not have the key to, said Sheehan.

It is believed that the Officer In Charge's computer became infected and the virus traveled to the largest store of data on the network which held files including arrest logs, motor vehicle records, calls for service and records management, according to the Town Crier.

FILES HELD TO RANSOME: HOW CRYPTOLOCKER LOCKS YOUR FILES AND THERE'S NOTHING YOU CAN DO CryptoLocker is malware that is often installed on computers at the same time. CryptoLocker locks your computer, encrypts files and demands a ransom for them to be unlocked. Computers can become corrupted through phishing emails that include malicious attachments and pop-up ads. According to reports from last year, the U.S. Government admitted that at least one police force has been forced to pay a $750 ransom to release sensitive files. Advertisement

When a Tewksbury officer tried to access the data, a demand for $500 was sent from a web address and account that is untraceable by authorities including the FBI and National Security Agency.

After this sort of infection occurs there are only two options which include accessing the most recent back-up or paying the ransom.

As Tewksbury's back-up was corrupted they were forced to pay the ransom, but Sheehan also noted that the malware infection was not a data breach.

'This isn't a breach. [The data] stays interior, but this virus encrypts it and prevents it from being readable,' Sheehan told the Town Crier.

Tewksbury is not the first police department to be a victim of ransomware in the U.S.

Similar incidents have occurred involving Swansea Police Department which paid a $750 ransom in November 2013, according to Town Crier.