Energy Secretary Rick Perry said Tuesday that "state-sponsored" or criminal hackers were targeting U.S. nuclear power plants and other energy providers, but that the government had resources to safeguard the nation's electric grid.

Perry told Fox Business Network that the threat of cyberattacks on the electric grid "is real, it's ongoing and we shouldn't be surprised when you think of the world we live in today."

The FBI and the Department of Homeland Security told energy providers last week that hackers might be trying to breach their computer systems. Hackers appear to have tried to breach the business and administrative networks of unidentified facilities, DHS said.

There was no threat to public safety, the agency said. DHS and the FBI routinely advise the private sector of possible cyberthreats to help officials protect potentially vulnerable networks.

The source of the intrusions is unknown, but Perry said the hackers "may be state-sponsored" or just "criminal elements" trying to penetrate vulnerable sites.

Perry said "the good news" is that the Energy Department has substantial resources to combat the threat "and we have been working on his for a long time."

Perry cited work by the Idaho National Laboratory to devise a "full-out grid" that helps officials detect problems and protect the grid.

"I want Americans to feel very comfortable we are doing everything possible to protect their information, but more importantly to protect the electrical grid from those that would try to penetrate in and do harm or do mischief," Perry said.

The Nuclear Energy Institute, an industry group, said last week that no nuclear reactors had been affected by the would-be hackers. If any facilities were affected by a cyberattack, a publicly available report would have to be made to the Nuclear Regulatory Commission, which oversees the nation's commercial nuclear fleet.

Senator Edward Markey, a Massachusetts Democrat, asked the Trump administration to tell Congress how many nuclear plants in the U.S. had been targeted by cyberattacks and how officials were addressing the threat.

"Given the consequences of a breach of safety at a nuclear power station ... evidence that foreign governments have targeted U.S. nuclear power stations must be treated with the utmost gravity," Markey wrote in a letter to Perry, Homeland Security Secretary John Kelly and other officials. "These profound risks to public safety and U.S. national security require a robust and coordinated response across federal agencies."