In Selfoss itself there was severe damage to buildings and dozens of panicked people had poured into the streets, a witness told Reuters news agency.
"Everything was shaking. The glass in the windows shook and everybody was just really scared," said the witness in Reykjavik.
"In Selfoss, where it happened, I heard everything is broken and people are standing outside in the street and everybody is terrified."
Volcanic island
Don Blakeman, an earthquake analyst at the USGS, said: "It looks like a 6.1 or a 6.2. As this part of Iceland sits on the north Atlantic ridge, it's not uncommon for there to be earthquakes."
Iceland, which has a population of 300,000, is a geologically unstable volcanic island in the north Atlantic.
The country's last major earthquake, in June 2000, measured 6.6 on the Richter scale.
It knocked down a dozen houses but caused no serious injuries.