A 7.6-magnitude earthquake has rocked the north-western part of Costa Rica triggering a tsunami warning, the US Geological Survey said.
A tsunami warning is in effect for Costa Rica, Panama, and Nicaragua.
The quake was centred about 50 miles (80 km) south of the town of Liberia and was at a depth of 12.4 miles.
It rattled buildings and cut power in some parts of the capital of San Jose, Reuters news agency reported.
Power and communications in much of the country were briefly knocked out, according to Costa Rican authorities.
Regional media reported it could be felt as far away as Nicaragua and El Salvador.
The US Geological Survey originally said the quake had a magnitude of 7.9, but revised it down to 7.6.
The Pacific Tsunami Warning Center reduced the area of the tsunami warning, which had earlier included the Pacific coast of most of Central and South America to Costa Rica and its immediate neighbours.
Douglas Salgado of the National Commission of Risk Prevention and Emergency Attention told the Associated Press news agency that there were no initial reports of damage or deaths in the earthquake zone.
He said officials were having problems reaching people in the area nearest the epicentre.