A hacker gained unauthorised entry to a system controlling the water treatment plant of a US city and tried to taint the water supply with a caustic chemical, officials have said.

The hacker who breached the system in the city of Oldsmar in Florida used a remote access programme shared by plant workers.

The person briefly increased the amount of sodium hydroxide by a factor of 100 (from 100 parts per million to 11,100 parts per million), Pinellas County Sheriff Bob Gualtieri said during a news conference.

Sodium hydroxide, also called lye, is used to treat water acidity but the compound is also found in cleaning supplies such as soaps and drain cleaners.

It can cause irritation, burns and other complications in larger quantities.

Fortunately, a supervisor saw the chemical being tampered with – as a computer mouse controlled by the intruder moved across the screen changing settings – and was able to intervene and immediately reverse it, Mr Gualtieri said.

Mr Gualtieri said the public was never in danger but he did say the intruder took “the sodium hydroxide up to dangerous levels”.

Oldsmar officials have since disabled the remote-access system, and say other safeguards were in place to prevent the increased chemical from getting into the water.

Officials warned other city leaders in the region – which was hosting the Super Bowl – about the incident and suggested they check their systems.

Experts say municipal water and other systems have the potential to be easy targets for hackers because local governments’ computer infrastructure tends to be underfunded.

Robert M Lee, chief executive of Dragos Security, and a specialist in industrial control system vulnerabilities, said remote access to industrial control systems such as those running water treatment plants has become increasingly common.

“As industries become more digitally connected, we will continue to see more states and criminals target these sites for the impact they have on society,” Mr Lee said.

The leading cybersecurity firm FireEye attributed an increase in hacking attempts it has seen in the last year mostly to novices seeking to learn about remotely accessible industrial systems.

Many victims appear to have been selected arbitrarily and no serious damage was caused in any of the cases – in part because of safety mechanisms and professional monitoring, FireEye analyst Daniel Kapellmann Zafra said in a statement.

“While the (Oldsmar) incident does not appear to be particularly complex, it highlights the need to strengthen the cybersecurity capabilities across the water and wastewater industry,” he said.

What concerns experts most is the potential for state-backed hackers intent on doing serious harm targeting water supplies, power grids and other vital services.

In May, Israel’s cyber chief said the country had thwarted a major cyber attack a month earlier against its water systems, an assault widely attributed to its archenemy Iran.

Had Israel not detected the attack in real time, he said chlorine or other chemicals could have entered the water, leading to a “disastrous” outcome.

Tarah Wheeler, a Harvard cybersecurity fellow, said communities should take every precaution possible when using remote access technology on something as critical as a water supply.

“The systems administrators in charge of major civilian infrastructure like a water treatment facility should be securing that plant like they’re securing the water in their own kitchens,” Ms Wheeler said.

“Sometimes when people set up local networks, they don’t understand the danger of an improperly configured and secured series of internet-connected devices.”

A plant worker first noticed the unusual activity at around 8am local time on Friday when someone briefly accessed the system but thought little of it because co-workers regularly accessed the system remotely, Mr Gualtieri told reporters.

But at about 1.30pm, someone accessed it again, took control of the mouse, directed it to the software that controls water treatment and increased the amount of sodium hydroxide.

The sheriff said the intruder was active for three to five minutes.

When they exited, the plant operator immediately restored the proper chemical mix, he said.

Other safeguards in place – including manual monitoring – were likely to have caught the change in the 24 to 36 hours it took before it reached the water supply, the sheriff said.

Investigators said it was not immediately clear where the attack came from – whether the hacker was domestic or foreign.

The FBI, along with the Secret Service and the Pinellas County Sheriff’s Office are investigating the case.

Russian state-backed hackers have in recent years penetrated some US industrial control systems, including the power grid and manufacturing plants, while Iranian hackers were caught seizing control of a suburban New York dam in 2013.

In no case was damage inflicted but officials say they believe the foreign adversaries have planted software boobytraps that could be activated in an armed conflict.