(Reuters) - Thousands of websites, including ones run by U.S. and UK government agencies, were infected for several hours on Sunday with code that causes web browsers to secretly mine digital currencies, technology news site The Register reported.

More than 4,200 sites were infected with a malicious version of a widely used tool known as Browsealoud from British software maker Texthelp, which reads out webpages for people with vision problems, according to The Register.

The news comes amid a surge in cyber attacks using software that forces infected computers to mine crypto currencies on behalf of hackers. The prevalence of these schemes has increased in recent months as the volume of trading in bitcoin and other crypto currencies has surged.

The tainted version of Browsealoud caused inserted software for mining the digital currency Monero to run on computers that visited infected sites, generating money for the hackers behind the attack, The Register said.

Representatives of the U.S. and British law enforcement agencies and Texthelp could not immediately be reached for comment.

Texthelp told The Register that it had shut down the operation by disabling Browsealoud while its engineering team investigated.