Andrew Harnik, Associated Press
A security guard turn visitors away from the Smithsonian's National Air and Space Museum in Washington, Tuesday, April 7, 2015, after widespread power outages cause many of the buildings along the National Mall to shut down temporarily. Widespread power outages affected the White House, State Department, Capitol and other sites across Washington and its suburbs Tuesday afternoon — all because of an explosion at a power plant in southern Maryland, an official said.

WASHINGTON — Widespread power outages affected the White House, the Capitol, museums, train stations and other sites across Washington and its suburbs Tuesday afternoon — all because of an explosion at a Maryland power plant, an official said.

Many of the outages were brief, but some were longer and forced evacuations. Officials said they did not suspect terrorism in the outages or the explosion that prompted them.

At the White House, backup generators kicked on when the power went out, so the interruption lasted only a few seconds. The complex quickly went back onto regular power. Electricity in the press briefing room dipped around lunchtime, briefly darkening cubicles and blackening TV screens.

White House press secretary Josh Earnest said he understands that Homeland Security has "indicated they don't currently see a nexus to terrorism or anything like that" in the power outages.

Earnest also said he was with President Barack Obama in the Oval Office when the power blip occurred at the White House, and they didn't notice anything unusual — possibly because the room is lit by so many windows.

Power also went out at the State Department during the daily press briefing, forcing spokeswoman Marie Harf to finish her comments in the dark.

Power in the U.S. Capitol building twice shut down briefly, then came back on by way of a generator.

Admiral William Gortney — commander of the U.S. Northern Command, which is tasked with homeland defense — was visiting the Pentagon when the outage hit. He said it was important to assess how well backup systems work during such events.

"Are the backup systems that we put in place, do they work? At the moment, that's what I've been told is that they all kicked in and they're all working, everybody was back up on backup power, which is why we do it. We build redundancy into this critical infrastructure."

But some effects of the outages were still apparent later Tuesday afternoon.

Some traffic lights were out, and Metro said 14 of its 91 public transit stations were affected. Power to the trains remained on and trains were moving systemwide, Metro spokesman Dan Stessel said, but the affected stations were on emergency power, with dimmer lighting and nonworking elevators and escalators.

University of Maryland officials said their entire campus was affected.

Some Smithsonian museums also were affected. The National Air and Space Museum, the National Museum of the American Indian, the National Portrait Gallery, Smithsonian American Art Museum and the Anacostia Community Museum were evacuated and closed to the public, a spokeswoman said.

Jenni Swan, who was visiting from Savannah, Georgia, with her husband and two children, said they were eating in the atrium of the Air and Space Museum around 1 p.m. when security officers said the building was being evacuated. Almost an hour later, they were not yet let back in.

"Honestly I think my kids are excited because of all the fire trucks and people leaving the building quickly," she said. "I think Daddy's a little annoyed."

D.C. Department of Homeland Security and Emergency Management spokeswoman Robyn Johnson cited the explosion at the power plant in Charles County, which is run by the Southern Maryland Electric Cooperative.

About 8,000 customers in Washington were affected, Johnson said. About 20,000 lost power in southern Maryland, Wanda Jackson, a spokeswoman for the Prince George's County Office of Homeland Security.

Utility company Pepco said it was investigating. Spokesman Sean Kelly said he didn't have details about locations or how many customers were affected overall.

Associated Press writer Jessica Gresko contributed to this report.