Washington: A 7.9 magnitude earthquake struck northwestern Costa Rica on Wednesday, the US Geological Survey said.

The major quake near the Pacific coast was centered about 80 kilometres south of Liberia, Costa Rica, and was at a depth of 20 kilometres.

A Caribbean-wide tsunami watch is in effect, the Pacific Tsunami Warning Center said.

"Earthquakes of this size have the potential to generate a widespread destructive tsunami that can affect coastlines across the entire Caribbean region," the warning centre said.