A 7.0 magnitude earthquake has shaken El Salvador and Nicaragua, just an hour after a powerful hurricane hit Nicaragua's eastern coast.

The double whammy was a grim test for a largely poor region which lacks resources and emergency plans for natural disasters.

Salvadoran authorities issued a tsunami alert as a precaution after the tremor, which struck around 75 miles off the coast of El Salvador, at a depth of 20 miles beneath the Pacific Ocean, according to the US Geological Survey. The quake was first measured at a magnitude of 7.2 but was then downgraded.

"Hazardous" waves measuring about up to 1m (three feet) were anticipated to hit coastal areas within 300km of the quake's epicentre. Officals warned anyone living on the Pacific coast of El Salvador to withdraw at least 1km away from the shore.

The tsunami warnings were lifted within hours of the earthquake on Thursday, according to the assistant director of the Sinapred national disaster prevention agency, Guillermo Gonzalez, said at a press conference.

Mr Gonzales said they would continue to monitor the threat from hurricane Otto, which continued to dump heavy rain and winds on Nicaragua.

Loading....

Shaking from the quake on Thursday afternoon was also felt in the Nicaraguan capital of Managua, and as far as the Costa Rican capital San Jose, in Honduras and Guatemala.

Nicaragua's president, Daniel Ortega, declared a state of emergency immediately after the quake. The country was already on alert for an hurricane which struck earlier the same day, as was Costa Rica.

There were no immediate reports of damage or casualties, according to the country's civil defense agency.

Just one hour before the earthquake, a powerful hurricane, Otto, packing winds of 110mph, made landfall on Nicaragua's Caribbean coast.

Thousands of people had already been evacuated from coastal areas into shelters - a total of 7,000 people were expected to evacuate in Nicaragua alone. Government officials said some people had refused to evacuate but did not say how many.

Earlier this week, four people died in Panama due to outer bands of the storm.

The heavy rains it was offloading were likely to cause dangerous flooding and mud slides, according to the US National Hurricane Center, with as much as 20 inches of rain expected in isolated areas across northern Costa Rica and southern Nicaragua. Schools were shut down and emergency teams were mobilised.

Otto was the southernmost hurricane to ever make landfall in Central America, the NHC said, and residents were not prepared.

The storm came ashore on Thursday near the Costa Rican border on the town of San Juan de Nicaragua, also known as Greytown. Residents said they were scared, and saw heavy rains and winds rip off roofs and bring down cable lines.

In the town of Bluefields, panic buying meant bottled water and lamps were swept off the shelves, and some residents fled in boats while others hammered themselves into their homes with metal sheeting, praying the storm would move on.

Otto will weaken as it moves inland and will likely become a tropical storm by Thursday evening, the center added. It is currently travelling west at around 9mph, chewing its way along both sides of Costa Rica's and Nicaragua's coastlines.