A powerful quake struck measuring 7.9 struck near Indonesia's Sumatra island on Wednesday triggering tsunami warnings in Indonesia, Malaysia and India, officials said.

The United States Geological Survey initially said on its Web site there was quake measuring 8.0, and then a short time later said there was a quake measuring 7.9 at slightly different location causing confusion about the number of quakes.

The quake had the potential to cause a tsunami, an Indonesian meteorological agency official said.

India's government also issued a tsunami alert for the Andaman Islands, and Malaysia issued a warning to stay away from beaches.

Some offices in Jakarta were evacuated after the tremors were felt.

"After praying I felt the earthquake. I panicked, threw away my shoes and ran through the emergency exit," said Widyastuti, a 23-year-old IT worker in Jakarta who was in one of Bank Indonesia's offices in central Jakarta.

Witnesses in Singapore and Thailand said they also felt the quake.

Indonesia suffers frequent earthquakes, lying on an active seismic belt on part of the so-called Pacific "Ring of Fire".