Indonesian officials say a powerful, shallow earthquake has hit off the western coast of Sumatra and warn that it could trigger a tsunami.

The U.S. Geological Service said the earthquake, which struck Wednesday evening, had a preliminary magnitude of 7.9. It said it was centered under the ocean at a depth of 10 kilometers (6.2 miles).

Shallow earthquakes are more apt to cause damage, but the USGS said the quake was located quite far from land, about 662 kilometers (411 miles) from Muara Siberut.

A monster quake off Indonesia in 2004 triggered a tsunami that killed 230,000 people in a dozen countries. Most of the deaths were in Aceh province.