A strong earthquake shook southern Mexico on Tuesday, causing panic and minor damage to buildings, and prompting an oil refinery to shut down as a precaution. There were no reports of major damage or injuries.

The magnitude-6.4 quake was felt across hundreds of miles, gently swaying buildings in Mexico City and rocking parts of Mexico's Gulf coast.

In Juchitan, the quake caused large cracks in some buildings, including serious damage to two churches, and it briefly cut power and telephone service, Mexican news media reported.

In Tuxtla Gutierrez, the capital of Chiapas state, many people fled into the streets and then lingered outside their homes, fearing aftershocks.

"It was horrible," said Cecilia Gomez, standing with her family outside her home. "It really scared me."

Daniel Roque, of Chiapas' civil protection agency, said some residents reported panic attacks, but no damage was registered.

Mexico's state-run oil company Petroleos Mexicanos shut down its Salina Cruz refinery on the southern coast as a precaution immediately after the 6:50 a.m. (7:50 a.m. EST) quake, two plant employees told Dow Jones Newswires. The employees spoke on condition of anonymity because they were not authorized to speak to the news media.

One of the employees said no damage had been found yet and that the refinery should restart production soon. He said the plant should be back to normal within 24 hours.

A Pemex spokeswoman would not comment on the reported shutdown. The refinery has a capacity of 330,000 barrels a day.

The U.S. Geological Survey said the quake was centered 70 miles southwest of Tuxtla Gutierrez, near the border between Oaxaca and Chiapas states.