The quake struck off of Costa Rica's Pacific coast, about 87 miles west of the capital, San Jose. It was centered more than 28 miles deep. The Geological Survey originally measured the quake at magnitude 7.9, but revised it downward.
The epicenter was just six miles away from the city of Hojancha
"Earthquakes of this size have the potential to generate a widespread destructive tsunami that can affect coastlines across the Caribbean region," the U.S. government said.
Authorities issued tsunami warnings for much of the Pacific coastlines of Costa Rica, Panama and Nicaragua, according to the Pacific Tsunami Warning Center. The warning was canceled for other locations.
An earlier tsunami watch for the Caribbean was sent out inadvertently and subsequently retracted.
CNN affiliate Teletica showed people streaming out of buildings after the quake.
Telephone service was knocked out in the cities near the epicenter, Teletica reported.