ACAPULCO, Mexico -- A moderately strong earthquake struck near Mexico's Pacific coast resort of Acapulco on Wednesday, causing cracks in some buildings and knocking bricks and plaster off other structures.

The U.S. Geological Survey said the quake at 7:38 a.m. had a magnitude of 6.2. It was centred near the Pacific coast and about 100 kilometres east of Acapulco.

No significant injuries were reported, but a chunk of ornamental plaster work fell off the facade of one hotel on Acapulco's once-glamorous main boulevard. Cracks were found in the walls of a university in Acapulco and a concrete entrance gate at a local military base collapsed, said Victor Torres Ruiz, the spokesman for the state government of Guerrero, where Acapulco is located.

An apartment block also suffered structural damage, according to Constantino Gonzalez Vargas, head of the state civil defence office.

Ezequiel Baltazar was driving his daughter to school in Acapulco along with his wife when the quake struck and a large chunk of rock fell from the hillside onto the trunk of his car.

"Fortunately, my wife and my daughter are OK. They just were panicked," Baltazar said.

Ruben Lopez, who was visiting Acapulco from Mexico City, said he was doing early morning exercises on the beach when the quake hit.

"It felt like I was sinking into the sand," Lopez said.

A second, smaller quake followed 24 minutes later. The USGS calculated the magnitude of the aftershock at 5.3.

Traffic lights went out in the city, causing traffic jams, and fears of more possible aftershocks prompted some schools in Acapulco to send children home for the day.

Buildings swayed in Mexico City, 280 kilometres to the north, and some people evacuated office buildings as an earthquake alarm sounded. On the city's main boulevard, one man injured his leg as he rushed out of an office building.

Mexico City Mayor Miguel Angel Mancera said there were no reports of damage or serious injuries.

Mexico City is vulnerable even to distant earthquakes because much of it sits atop the muddy sediments of drained lake beds that quiver as quake waves hit.

The magnitude-8.1 quake in 1985 that killed at least 6,000 people and destroyed many buildings in Mexico City was centred 400 kilometres away on the Pacific coast.