Officials in an Ontario beach town spent several weeks unable to access government data because their computers had been taken over by hackers.

The Town of Wasaga Beach says all of its data was locked April 30 as part of a ransomware scam, in which malicious software is utilized to block users from using computers until a ransom is paid.

The scammers initially demanded 11 Bitcoins, worth approximately $144,000 at the time, to release the 11 servers.

After seven weeks communicating with hackers via “secure encrypted email,” the town was able to negotiate the price down to three Bitcoins, or about $35,000, for four servers containing the vast majority of the town’s data. No personal information was compromised.

“It was like living in a spy movie,” said chief administrative officer George Vadeboncoeur, who made the decision to pay the hackers after seeking expert advice. The $35,000 paid seemed like pennies compared to the alternative. “We would have been into hundreds of thousands of dollars, because we would have had to start from scratch to recreate everything,” he said.

“This seemed like a small price to pay in order to get the data back.”

Factoring in payments to consultants and other experts as well as overtime and lost productivity costs, town officials estimate that the total cost of the hack to Wasaga Beach surpassed $250,000. The costs are detailed in a report presented to town councillors Tuesday night.

“It’s very unfortunate when it happens, it’s extra unfortunate when it’s public dollars,” said councillor Sylvia Bray. The town had to dip into its reserve fund to pay for the ordeal.

The town has since built a new network, which is believed to be safeguarded against a repeat attack. Additional backup servers have also been installed, and the town’s leaders say they’ve developed a better understanding of how to protect their corporate security.

“We are well positioned to weather the storm and move forward,” said councillor Joe Belanger. “This could have been devastating.”

With a report from CTV Barrie’s Beatrice Vaisman.