JAKARTA, Indonesia — A powerful earthquake struck western Indonesia on Wednesday, killing three people and injuring 25 others, officials said. A tsunami warning was briefly triggered, but no waves were detected.

The U.S. Geological Survey said the quake had a preliminary magnitude of 7.6 and struck under the island of Simeulue off the western coast of Sumatra — the region worst hit in the 2004 Indian Ocean tsunami.

Rustam Pakaya, the head of the Indonesian Health Ministry's disaster center, said "many" buildings on Simeulue were damaged and three people were killed. He said at least 25 others were seriously injured.

The Pacific Tsunami Warning Center issued an alert saying coastlines close to the epicenter were at risk of a possible tsunami. It canceled the warning two hours later after no large waves were generated.

The quake was felt across much of western and northern Sumatra, where many people fled swaying homes and buildings. In coastal areas, residents ran to high ground in fear of a tsunami.

"Everything shook very strongly for more than a minute and I ran along with the others. I heard people screaming in panic," said Ahmad Yushadi, a resident of Aceh province on the northern tip of the island.

Indonesia, the world's largest archipelago with a population of 235 million people, is prone to seismic upheaval because of its location on the "Ring of Fire," an arc of volcanos and fault lines encircling the Pacific Basin.

The Indian Ocean fault that ruptured Wednesday is particularly deadly.

A magnitude-9 quake there in 2004 triggered a tsunami that killed more than 230,000 people in a dozen countries, most of them on Sumatra. Three months later, an 8.7 quake further down the fault killed 1,000 on the islands of Nias and Simeulue.