The drawings were so detailed that experts say skilled attackers could have used them, along with other tools and malicious code, to knock out electricity flowing to millions of homes. The breach involved Calpine Corp., a power producer with 82 plants operating in 18 states and Canada.

Digital clues pointed to Iranian hackers. And Wallace found that they had already taken passwords, as well as engineering drawings of dozens of power plants, at least one with the title ‘‘Mission Critical.’’

SAN JOSE, Calif. — Security researcher Brian Wallace was on the trail of hackers who had snatched a California university’s housing files when he stumbled onto a larger nightmare: Cyberattackers had opened a pathway into networks running the United States power grid.


Wallace was astonished. But this breach, the Associated Press has found, was not unique. About a dozen times in the last decade, sophisticated foreign hackers have gained enough remote access to control the operations networks that keep the lights on, according to top experts who spoke on condition of anonymity due to the sensitive nature of the subject matter.

The public almost never learns the details about these types of attacks — they’re rarer but also more intricate and potentially dangerous than data theft. Information about the government’s response to these hacks is often protected and sometimes classified; many are never even reported to the government.

These intrusions have not caused the kind of cascading blackouts that are feared by the intelligence community. But so many attackers have stowed away in the systems that run the US electric grid that experts say they probably have the capability to strike at will. And that’s what worries Wallace and other analysts most.

‘‘If the geopolitical situation changes and Iran wants to target these facilities, if they have this kind of information it will make it a lot easier,’’ said Robert M. Lee, a former Air Force cyberwarfare operations officer.


Neither US officials nor cybersecurity experts would or could say if the Islamic Republic of Iran was involved in the attack that Wallace discovered. Hamid Babaei, a spokesman for the Iranian UN Mission, did not return calls or address questions e-mailed by AP.

In 2012 and 2013, in well-publicized attacks, Russian hackers successfully sent and received encrypted commands to US public utilities and power generators; some private firms concluded this was an effort to position interlopers to act in the event of a political crisis.

And the Department of Homeland Security announced about a year ago that a separate hacking campaign, believed by some private firms to have Russian origins, had injected software with malware that allowed the attackers to spy on US energy companies.

The hackers have gained access to an aging, outdated power system. Many of the substations and equipment that move power across the United States are decrepit and were never built with network security in mind; hooking them up to the Internet over the last decade has given hackers new backdoors in.

Distant wind farms, home solar panels, smart meters, and other networked devices must be remotely monitored and controlled, which opens up the broader system to fresh points of attack.

Hundreds of contractors sell software and equipment to energy companies, and attackers have successfully used those outside companies as a way to get inside networks tied to the grid.


Private firms have alleged other recent hacks of networks and machinery tied to the US power grid were carried out by teams from within Russia and China, some with governmental support.

Even the Islamic State is trying to hack American power companies, a top Homeland Security official told industry executives in October.

The attack involving Calpine is particularly disturbing because the cyberspies grabbed so much, according to previously unreported documents and interviews. Cybersecurity experts say the breach began at least as far back as August 2013.

Calpine spokesman Brett Kerr said the company’s information was stolen from a contractor that does business with Calpine. He said the stolen diagrams and passwords were

old — some diagrams dated to 2002 — and presented no threat, though some outside analysts disagree.

The hackers stole user names and passwords that could be used to connect remotely to Calpine’s networks, which were being maintained by a data security company.

Even if some of the information was outdated, experts say skilled hackers could have found a way to update the passwords and slip past firewalls to get into the operations network.

Eventually, they say, the intruders could have shut down generating stations, fouled communications networks and possibly caused a blackout near the plants.

They also took drawings of networks and power stations from New York to California — 71 in all — showing the precise location of devices that communicate with gas turbines, boilers, and other crucial gear.