The quake hit 170 kilometers (105 miles) southeast of the capital San Salvador, at a depth of 70 kilometers (44 miles), the USGS said.
The US Pacific Tsunami Warning Center issued a warning for coasts located within 300 kilometres (190 miles) of the epicenter.
The shaking of the earth was felt as far as the capital of Nicaragua, Managua, and other cities, but no immediate injuries or damage were reported, officials said.
Electricity and cell phone service in some areas were cut off. (AFP)