WASHINGTON — A 5.8 magnitude earthquake centered in Virginia forced evacuations of all the monuments on the National Mall in Washington and rattled nerves from Georgia to Maine. No injuries were immediately reported.

The U.S. Geological Survey said the earthquake was half a mile deep and centered near Louisa, Va., about 40 miles northwest of Richmond. Shaking was felt at the White House and all over the East Coast, as far south as Chapel Hill, N.C. Parts of the Pentagon, White House and Capitol were evacuated.

President Barack Obama and many of the nation’s leaders were out of town on August vacation when the quake struck at 1:51 p.m. EDT. The shaking was felt on the Martha’s Vineyard golf course as Obama was just starting a round.

At the Pentagon in northern Virginia, a low rumbling built and built to the point that the building was shaking. People ran into the corridors of the government’s biggest building and as the shaking continued there were shouts of “Evacuate! Evacuate!”

The U.S. Park Service evacuated and closed all National Mall monuments and memorials. At Reagan National Airport outside Washington, ceiling tiles fell during a few seconds of shaking. Authorities announced it was an earthquake and all flights were put on hold.

At the Capitol, Ken Lundberg, communications director for Sen. Olympia Snowe, R-Maine, described a jolting experience.

“It was like someone put our building on springs and shoved us sideways,” Lundberg said. “It was quite a jolt.”

Lundberg said officials were still inspecting the Capitol several hours after the earthquake occurred, but that he had not witnessed or heard any reports of damage.

Jessica James, a staffer for Sen. Susan Collins, R-Maine, said via email that she was at her desk when she felt the tremor begin.

“I had never felt anything like it. Ceiling tiles fell,” said James, who is from Rumford. “There was a calm, organized evacuation of the building. We are trained and know what to do in case of an emergency like this. Senator Collins contacted us immediately to make sure we were all safe, and fortunately we are. But it was definitely frightening.”

The earthquake occurred during Congress’ August recess, so Maine lawmakers were back home in the state, and a number of staffers were either on vacation or working back in state and district offices, too. That was the case with the office of Rep. Chellie Pingree, D-1st.

Willy Ritch, spokesman for Pingree, said Pingree’s Capitol office is closed this week, with staffers who are not on vacation working in Pingree’s district office.

Lindsay Chard, a Portland native and Deering High School grad who works for the National Law Enforcement Officers Memorial Fund in Washington D.C., said her building was evacuated for about an hour.

“It was freaky. I’ve never felt that before,” she said of the building shaking. “To be honest my first thought was terrorist attack.”

Bethany Lowe, who is originally from Saco and now works at a private school in Middleburgh, Va., about 100 miles north of Richmond, was speaking with co-workers in her office when she felt the building shake.

“We didn’t know if a big truck was going by, then things started shaking side to side more aggressively and I said, ‘We are having an earthquake,’ ” she said. “It wasn’t like there was anything falling that made it hazardous to leave, so everybody hustled outside where it was pretty open . . . Everybody was just kind of in awe that we just had an earthquake.”

In New York, the 26-story federal courthouse in lower Manhattan began swaying and hundreds of people were seen leaving the building. Court officers weren’t letting people back in.

The quake came a day after an earthquake in Colorado toppled groceries off shelves and caused minor damage to homes in the southern part of the state and in northern New Mexico. No injuries were reported as aftershocks continued today.

In Charleston, W.Va., hundreds of workers left the state Capitol building and employees at other downtown office buildings were asked to leave temporarily.

“The whole building shook,” said Jennifer Bundy, a spokeswoman for the state Supreme Court. “You could feel two different shakes. Everybody just kind of came out on their own.”

In Ohio, where office buildings swayed in Columbus and Cincinnati and the press box at the Cleveland Indians’ Progressive Field shook. At least one building near the Statehouse was evacuated in downtown Columbus.

In downtown Baltimore, the quake sent office workers into the streets, where lamp posts swayed slightly as they called family and friends to check in.

Social media site Twitter lit up with reports of the earthquake from people using the site up and down the U.S. eastern seaboard.

“People pouring out of buildings and onto the sidewalks and Into Farragut Park in downtown DC…,” tweeted Republican strategist Kevin Madden.

“did you feel earthquake in ny? It started in richmond va!” tweeted Arianna Huffington, president and editor-in-chief of the Huffington Post Media Group.

John Gurlach, air traffic controller at the Morgantown Municipal Airport was in a 40-foot-tall tower when the earth trembled.

“There were two of us looking at each other saying, ‘What’s that?'” he said, even as a commuter plane was landing. “It was noticeably shaking. It felt like a B-52 unloading.”

Immediately, the phone rang from the nearest airport in Clarksburg, and a computer began spitting out green strips of paper — alerts from other airports in New York and Washington issuing ground stops “due to earthquake.”

MaineToday Media’s Washington Bureau Chief Jonathan Riskind and Staff Writer David Hench contributed to this report.