A ransomware attack held hostage Madison County, Idaho’s services, ranging from the sanitation department to the county treasurer’s office.

The attack infected the county’s network on Sunday night after someone opened a phishing email demanding an unspecified amount of money, according to The Rexburg Standard Journal.

“I was stunned at the magnitude of it. It surprised me at the depth and how deep they went into the system and destroyed the servers,” Madison County Commissioner Brent Mendenhall told the publication. “People who look for cracks in a server and get past the firewalls can lock up all of your system.”

The county’s IT team was eventually able to get the county’s payroll systems back up and by Thursday night, most of the system had been backed up from files saved before the attack. Officials expect residual technical issues in the following weeks.