Trees fell, rooftops were damaged and roads split by the quake near the epicentre in the coastal province of Guanacaste. People rushed into the streets 150 kilometres away in the capital San Jose.

Authorities said around 20 people were injured in the quake. Nearly 12 hours after the quake, some towns remained without electricity or water.

A Red Cross spokesman initially said a man and a woman died after suffering heart attacks in the town of Filadelfia, not far from Nicoya, which is roughly 10 kilometres from the epicentre.

But the Red Cross later corrected this to say just one person, a 55-year-old woman, had died of a heart attack.

"Here in Nicoya, fortunately we have only seen very minor injuries, people with minor cuts -- nothing significant given the magnitude of the storm," said the spokesman, Adolfo Saenz.

Costa Rican President Laura Chinchilla said: "The most important thing is to remain calm, there is no major damage." The US Geological Survey initially said the quake, which struck on the Pacific coast of Costa Rica, measured 7.9 on the Moment Magnitude Scale, but revised both the intensity and location in a subsequent advisory.

In its latest advisory, the USGS said the quake measured 7.6 and struck at a depth of about 40 kilometres.

A USGS map showed the quake centered near the Pacific coast, in picturesque Guanacaste, a tourist area popular for its cliffs, beaches and surfing.

A tsunami warning was issued for Costa Rica, Panama and Nicaragua, but later cancelled, the US Pacific Tsunami Warning Center said. Initially, the warning had extended from Mexico to Peru.