Picture: Twitter

Mexico - An earthquake of magnitude 8 struck off the southern coast of Mexico late on Thursday, the US Geological Survey (USGS) said, shaking buildings in the capital city.

People in Mexico City ran out into the streets after the quake struck, a Reuters witness said.

Widespread, hazardous tsunami waves were possible, the Pacific Tsunami Warning Centre said. 

There were no immediate reports of major damage.

Mexico's civil protection agency said it was the strongest earthquake to hit the country since a devastating 1985 tremor that toppled buildings and killed thousands.

People in Mexico City ran out into the streets in pyjamas and alarms sounded after the quake struck just before midnight, a Reuters witness said. Power went out in some neighbourhoods.

"I had never been anywhere where the earth moved so much. At first I laughed, but when the lights went out I didn't know what to do. I nearly fell over," said Luis Carlos Briceno, an architect, 31, who was visiting Mexico City.

The epicentre was 123 km (76 miles) southwest of the town of Pijijiapan, at a depth of 33 km (21 miles).