A powerful magnitude 7.4 earthquake has struck off the coast of El Salvador, the US Geological Survey (USGS) says, but there were no immediate reports of damage.

The quake hit 170 kilometres south-east of the capital San Salvador, at a depth of 40km, the USGS said.

The Pacific Tsunami Warning Center had earlier issued a warning for coasts located within 300km of the quake's epicentre, but then said there was no longer a threat.

"The tsunami threat from this earthquake has now mostly passed," the warning centre said in an update.

Wilfredo Salgado, mayor of the city of San Miguel in El Salvador, said on his Twitter account that a man was killed when an electricity post fell on him.

There were no immediate reports of major damage after the quake struck, local emergency services said.

The tremor was felt as far as the capital of Nicaragua, Managua, and other cities. Electricity and cell phone service in some areas have been cut off.

AFP/Reuters