The city of Plainfield was struck last week by hackers who demanded money in exchange for the release of encrypted files, the mayor told New Jersey 101.5 Wednesday.

Mayor Adrian Mapp said city officials reached out to state and federal law enforcement authorities for help. He said the NJ State Police Cyber Crimes Unit is still working with the Network Intrusion Unit of the Secret Service to resolve the problem.

The city is the latest victim of ransomware, a type of software that allows hackers to hold certain files for ransom.

Mapp saud the ransomware was discovered by employees in the municipal building.

"The virus entered through one of our computers in the finance department, which is where it first occurred," Mapp said. "We were attacked by a ransomware virus and we responded as quickly as we were able to. We immediately informed the (Union County) Prosecutor’s Office, State Police and the Secret Service, and all of these agencies have been involved since we got this message."

In a press release Wednesday afternoon, Mapp said "the TeslaCrypt 3.0 virus was inadvertently introduced into the system by a city employee and quickly managed to infiltrate some of the city's shared servers."

In order to minimize further exposure, the city cut links to backup servers, but officials say a percentage of files had already been encrypted.

Investigators found the ransom demand among the encrypted files. They demanded that the city pay 500 euros in bitcoin, which is a digital currency that's nearly untraceable.

Mapp said that although some of the files are still being held for ransom, the infiltration of the virus never led to a shutdown of the municipal building or any of its departments.

"We are functional, we have never lost the ability to function, and so there are some files that have been and are still being held ransom not affected our ability to function as a municipality," Mapp told NJ 101.5.

In a later press release, the mayor went on to say that "while we understand that there is a level of risk involved in utilizing a tool which is shared by billions of people around the world we cannot allow this incident to curtail the business of the city."

"We have been able to function normally during this attack. These individuals have not held us hostage," Mapp said.

The Union County Prosecutor's Office would not comment on the ongoing investigation.

"The UCPO does not comment on active investigations of this nature," the Prosecutor's Office said in an emailed statement to NJ 101.5 Wednesday.

It is not yet know if the city has decided to pay the ransom, or if any residents' personal information was compromised.

According to the FBI, ransomware involves a type of malware "that infects computers and restricts users’ access to their files or threatens the permanent destruction of their information unless a ransom—anywhere from hundreds to thousands of dollars—is paid."

The malware can affect not just personal computers, but business and government files as well. While this type of malware has existed for a while, the FBI states that there has been an uptick in recent years.

In July, NBC news reported that the previous year, a town in New York made ransom payments of $300 and $500 to keep their computer systems running.

In 2015, Lincoln County Sheriff's Office in Maine reported that their computers were held hostage, according to NBC. The county sheriff said after making several attempts to retrieve the records, the agency finally paid a ransom of about $300. The FBI then helped track the payment to a Swiss bank account, but the hackers couldn't be identified.

In addition, last year in order to get its files unencrypted, police in the Chicago suburb of Midlothian paid a $500 ransom in bitcoin.

Toniann Antonelli is the digital managing editor for news at NJ 101.5. Reach her at toniann.antonelli@townsquaremedia.com, or on Twitter @ToniRadio1015.