The head of the NSA issued a blunt warning Thursday to lawmakers: China can shut down the United States.

The grim forecast came from Admiral Michael Rogers, the director of the National Security Agency and commander of the U.S .Cyber Command.

Rogers said he believed China along with “one or two” other countries had the capability to successfully launch a cyber-attack that could shut down the electric grid in parts of the United States.

Rogers reiterated that if the U.S. remains on the defensive, it would be a “losing strategy.”

Speaking to the House Intelligence Committee, the NSA director said the cyber threat was “so real,” and that agreeing to an international code, a sort of “laws of law” in the cyber realm is urgent.

More On This...

The possibility of such cyberattacks by U.S. adversaries has been widely known, but never confirmed publicly by the nation's top cyber official.

At a House hearing, Rogers says U.S. adversaries are performing electronic "reconnaissance," on a regular basis so that they can be in a position to attack the industrial control systems that run everything from chemical facilities to water treatment plants.

Outside experts say the U.S. Cyber Command also has that capability, which in theory should amount to mutual deterrence.

Fox News' Catherine Herridge and The Associated Press contributed to this report.