
The quake was recorded off the Costa Rican coast, about 150 km west of the capital, San Jose. The epicenter was less than 10 km away from the city of Samara.
The U.S. Geological Survey had given it a preliminary magnitude of 7.9, but it was later revised to a magnitude 7.6.
In the coastal town of Nosara, trees shook violently and light posts swayed. One resident also posted a picture on Twitter of a hospital that was damaged in Puntarenas, Costa Rica.
The quake triggered a tsunami warning for Costa Rica, Panama, Nicaragua, El Salvador, Honduras, Mexico, Colombia, Ecuador, Guatemala and Peru and a tsunami watch in Chile.
According to the Pacific Tsunami Warning Center, earthquakes of this size have the potential to generate a widespread destructive tsunami.
With files from CNN