One of the strongest earthquakes to strike the US east coast in decades rattled offices Tuesday in downtown Washington and caused panicked evacuations from skyscrapers as far away as New York.

The Pentagon, the US Capitol and Union Station in the nation's capital were all evacuated after the 5.9-magnitude quake, which was shallow with its epicenter only 0.6 miles (one kilometer) underground.

The disruption to cell phone services in the hour after the quake added to the sense of panic in a country preparing to mark the 10th anniversary of the September 11, 2001 terror attacks.

Seismologists from the US Geological Survey said the epicenter was 27 miles (47 kilometers) from Charlottesville, Virginia, and 87 miles (139 kilometers) from Washington, where Reagan National Airport was also evacuated.

"This is one of the largest earthquakes on the east coast in quite a while, in many decades at least," USGS spokeswoman Lucy Jones told CNN. "It's not unprecedented. But it's one of the largest we've had there."

The quake was felt as far away as Martha's Vineyard, around 500 miles (800 kilometers) away, off the coast of Massachusetts, where President Barack Obama was playing golf during his vacation.

In New York, thousands of people poured onto the streets as evacuation procedures put into place after September 11 attacks were activated.

"I was in the street when the ground shook and I looked up to see the building shaking like a tuning fork," Mary Daley told AFP below one Wall Street skyscraper.

Police in New York herded people toward local parks away from tall buildings as precautionary checks were started.

"I was on the 20th floor of the court building and it shook like mad. Everyone is scared," said Dan Ramater as he stood in Center Street where traffic jams quickly built up in the jittery chaos.

Manhattan District Attorney Cyrus Vance had just started speaking at a press conference about the sensational Dominique Strauss-Kahn sexual assault case when the building started shaking.

Fatima Richardson, 28, who was sitting on the steps of courthouse on her lunch break said: "You could see the building moving. I was just freaking out."

Blocks away, Juan Ramos, an office worker in Lower Manhattan was dazed and confused after giving blood.

"I saw my cup of coffee shaking but I thought nothing of it. I had just donated blood so I thought I had not recovered my equilibrium," he told AFP.