The U.S. government is not prepared for a cyberattack on the electrical grid that takes out power over a large area for weeks, or even months.

A widespread, long-lasting power outage caused by a cyberattack may be unlikely, but the U.S. government needs to better plan for the possibility, Representative Lou Barletta, a Pennsylvania Republican, said Thursday.

With some experts worried that a coordinated cyberattack could lead to widespread power outages lasting for several months, the federal government should offer more help to state and local governments planning to deal with the aftermath, Barletta said during a hearing before a subcommittee of the House of Representatives Transformation and Infrastructure Committee.

Barletta and other subcommittee members pointed to a coordinated attack on Ukraine's power grid last December that left more than 200,000 people without electricity for a few hours. A cyberattack, combined with a physical attack or with extreme weather conditions, could have devastating results, lawmakers said.

"Imagine what we would do without electricity for a day, a week, a month, a year," Baretta said. "If the goal of the bad guys is to collapse the United States' economic system, they are going to try to cut off the power."

The U.S. has few high-power electrical transformers held in reserve, because of the multimillion-dollar price tag, and the delivery of new ones can take more than six months, added Representative Peter DeFazio, an Oregon Democrat.

"There's a question of whether the federal government should be stockpiling these transformers," he said. "Now, they're basically custom orders."

Federal agencies are planning for a possible widespread power outage. The Department of Energy has outage training exercises planned in the Pacific Northwest in coming weeks, and the agency is researching ways to speed up the manufacturing of high-power transformers, said Patricia Hoffman, assistant secretary in the DOE's Office of Electricity Delivery and Energy Reliability.

Rescuing people trapped in elevators and other security issues needs to be a top priority in an outage, he said, but long-term outages lead to "cascading effects."

"Planning needs to be measured in weeks," Fugate added.

The good news is the U.S. electric grid is built to route around local points of failure, added Caitlin Durkovich, assistant secretary for infrastructure protection at the Department of Homeland Security.

"The grid, by its very design, is resilient," she said. "The electric grid has been engineered with one principle in mind -- reliability."