A strong earthquake of magnitude 6.0 shook Mexico early on Friday, sending thousands of tourists in Acapulco fleeing into the streets in panic and knocking out electricity as far away as the capital.

There were no immediate reports of injuries from the quake, centered in the Pacific coastal state of Guerrero.

"Oh man, we felt it. We jumped out of bed and went into the garden. I was fast asleep. It really shook. Things fell off shelves," said Acapulco resident Anna Archdale de Palazuelos.

Tourists, many of them in nightgowns and pajamas, were evacuated from their hotels in Acapulco, where 20,000 homes lost electricity.

An aftershock, centered close to the first tremor, was felt about three hours later, which the U.S. Geological Survey said was magnitude 5.4. Hundreds of tourists in Acapulco again ran from their hotels. Most were too scared to go back inside so they instead bedded down on benches and pavements.

"I'm going to stay here until it's over. We're scared there could be another one," said Guadalupe Flores, 15, on holiday with her family in a beachfront hotel and wearing pajamas after being awakened by the aftershock.

There were still no reports of damage or injuries in Acapulco or Mexico City, emergency services said.

After the first shock, power went down in some areas of Mexico City, which was devastated by a 8.1 magnitude earthquake in 1985 that killed around 10,000 people.

"We were in the house sleeping. It woke us up. My girlfriend heard a noise like thunder," said Mexico City resident Adan Gutierrez.

Inhabitants in the capital's central Tlatelolco district, badly hit 22 years ago, rushed out into a main square. Mexican radio said the windows of some homes there were broken.

Friday's initial quake hit at 12:42 local time (05:42 GMT) and was centered 40 miles northwest of Acapulco, the biggest city in Guerrero and home to around a million people.

Fire services in the city rushed out to check for damage. Authorities in the state capital Chilpancingo said they had no reports of serious damage or injuries.