WASHINGTON — A power line broke loose at an electrical substation near Washington on Tuesday, briefly dimming the White House, emptying museums and cutting electricity to government buildings and the U.S. Capitol for hours.

The Justice Department and State Department were among thousands of customers whose power was cut in the early afternoon, along with the University of Maryland and some World Bank offices.

The outage was caused by a power line breaking loose in Maryland south of Washington, causing a drop in voltage, electrical company officials said.

There were concerns that militant groups might be responsible, but the Department of Homeland Security said there was no indication of malicious activity. The outage was centered in the heart of Washington before power was largely restored a few hours later.

White House offices and the press room went dark briefly before backup sources kicked in. President Barack Obama was in the Oval Office and did not notice the power failure, spokesman Josh Earnest told a news briefing.

“Things are slowly but surely returning to normal here in the White House complex,” he said.

The State Department’s daily briefing was suspended after power was lost. At the Capitol complex, where lawmakers were absent for an Easter recess, a backup generator switched on, keeping most lights and appliances running.

Museums emptied

At least four Smithsonian museums were evacuated, including the Natural History Museum on the National Mall, where the power failure left hundreds of visitors milling around outside.

“It was just dark and a lot of people there and it was dark and it was awkward. Because, like, you couldn’t see anything, you’re just standing there and the lights are off,” tourist Karina Coulter told Reuters Television.

Some subway stations in the United States’ second-busiest mass transit system ran on backup power. Buses were deployed to shuttle passengers from one station to another.

Power supplier Pepco Holdings Inc. said its crews were repairing transmission equipment in Charles County, Maryland. The company’s website showed a handful of customers without power by early evening, mostly in the District of Columbia.

The Southern Maryland Electric Cooperative, or SMECO, said in a tweet that a Pepco transmission conductor broke loose at a SMECO substation, causing the outages. A spokeswoman for Pepco, Courtney Nogas, said a broken insulator had caused a fallen transmission line.

Thomas Popik, founder of watchdog group the Foundation for Resilient Societies, said the outage “is an excellent example of the grid’s fragility and why physical security is so important.”

He said federal regulations on the electric grid failed to address worries about physical security.

Adm. Bill Gortney, commander of North American Aerospace Defense Command and U.S. Northern Command, said at a Pentagon news briefing he had been told all backup systems had kicked in.

But Gortney said he will be checking to see “did they perform as advertised? Do we need to strengthen in some areas?”