The infection, first detected September 19, prevented nearly every government agency within the county from gaining access to its operating systems, files and websites, the Montgomery Advertiser reported.
"When we went to retrieve the data, we had the vendor come in and try to get to that data," Lou IaIacci, the county's chief IT officer, told local station WSFA 12. "Their recommendation [was] to do a cleanup [but] when we did the cleanup we lost the data."
The county was given seven days to cough up the dough, and cracked on the fourth.
Calling an emergency meeting Friday to authorize the funds, the group decided to pay half of the ransom on Saturday and the other half on Sunday, gaining access to more data each day.
To conduct the transaction, officials first had to purchase 9 bitcoins, ranging in price between $40,000 to $50,000, to pay off the tricksters.
"I hate to say this, but their reputation is that they do return stuff. They think of themselves as modern day Robin Hoods, they are here helping the masses," IaIacci admitted. "They are the good guys: they are going to come in, hack you and grab the files [and] if you pay them, that's your punishment for letting them in."
"You don't think about these things till they happen," Elton Dean, county commission chairman, told the Advertiser Monday. "When you are talking about losing about $5 million worth of files, that's kind of like an emergency situation."
With officials now in recovery mode, IaIacci announced the county would now be setting up precautionary measures to prevent a similar scenario from happening in the future.