Thousands of government websites have been hijacked by hackers to mine cryptocurrency, in a process known as "cryptojacking", it has emerged.

The sites, including the Information Commissioner's Office, the Scottish NHS helpline and the Student Loans company - along with hundreds of other central and local government sites - appear to have been running a power-pinching program that uses visitors' computers to mine cryptocurrencies.

The websites were infected with malware called Coinhive, which works by hiding in a website’s code, while stealing the processing power of its visitors' devices to mine cryptocurrency.

Coinhive mines Monero, a digital currency similar to Bitcoin, that uses decentralised technology for secure payments and storing money that doesn't require banks or people's names. The digital coins are stored in an anonymous digital wallet, to be withdrawn at a later date. Visitors may notice their antivirus software popping up to warn them when visiting infected sites and may experience a slowing of their computer or smartphone.

It is unclear how long the sites had been infected but following an inquiry from the Telegraph on Sunday, the ICO took its website offline.