A massive earthquake shook Indonesia on Wednesday, killing at least 5 people, injuring scores and triggering a small tsunami that hit one city on the island of Sumatra, authorities said. Tsunami warnings were issued for much of the Indian Ocean region.

Click here to view photos.

The 8.4-magnitude quake off Sumatra island damaged malls, mosques and car dealerships along the coast and could be felt in at least four countries, with tall buildings swaying as far as 1,200 miles away.

Click here to watch video.

It was followed by a series of aftershocks, the strongest of which registered at a magnitude of 6.6 and triggered a second tsunami alert for Indonesia, which was lifted about an hour later, said Suhardjono, an official with Indonesia's meteorological agency, who goes by only one name.

At least five people were killed. The Health Ministry reported two people killed in Bengkulu, a town in Sumatra close to the epicenter. And in the city of Padang, three bodies were pulled from badly damaged buildings, a witness, Alfin, said by phone.

Excavation machinery was used to search for survivors.

Most of the damage appeared to be from the quake.

A tsunami about 3 feet high was reported to have struck Padang about 20 minutes after the initial quake, Suhardjono said, adding that severed phone lines made it hard to get details. The Pacific Tsunami Warning Center also reported that a small tsunami hit Padang.

Several buildings in Padang were damaged and at least one car showroom collapsed in the quake, according to detik.com, which said people were searching to see if anyone was inside.

Dozens of people were injured in Bengkulu, local government official Salamun Harius told El Shinta radio. At least 100 others were hospitalized, senior Health Ministry official Rustam Pakaya said.

Residents in Bengkulu, where at least one building was demolished, said the quake triggered panic and that people ran inland.

"Everyone is running out of their houses in every direction," said Wati Said, who spoke by cell phone standing outside her house. "We think our neighborhood is high enough. God willing, if the water comes, it will not touch us here."

"Communication is cut, we can't call out," she added. "I don't know how you contacted us. Everyone is afraid."

The quake could be felt in the Indonesian capital, Jakarta, 375 miles away, where office workers streamed down the stairwells of tall, swaying buildings. It also caused tall buildings to sway in neighboring Malaysia, Singapore and Thailand.

The undersea quake hit at about 6:10 p.m. (7:10 a.m. EDT), the U.S. Geological Survey said. It was centered 80 miles southwest of Sumatra island at a depth of 18.6 miles.

"Earthquakes of this size have the potential to generate a widespread destructive tsunami that can affect coastlines across the entire Indian Ocean Basin," the Pacific Tsunami Warning Center said, warning that waves could hit Indonesia and Australia within an hour, and Sri Lanka and India within three hours.

It lifted the alert for Indonesia about two hours later, saying there was no longer a potential for a destructive wave.

An official with Thailand's National Disaster Warning Center, Passakorn Khanthasap, said it had sent cell phone text messages alerting hundreds of officials in six southern provinces.

The Kenyan and Tanzanian governments issued tsunami warnings and told people to leave beaches.

Residents of the coastal city of Mombasa crowded into buses and left sprawling public beaches after hearing the warning over the radio. Police were moving people off the coastline.

In Seychelles, which would likely be hit by a tsunami before Kenya, authorities said they had downgraded a tsunami warning because the window for a strike had passed.

In India, officials said nothing was felt in the remote Andaman and Nicobar islands, some of which are just 150 miles north of Sumatra.

The Indian government issued a tsunami alert for the islands, and officials told authorities to take precautions, said Dharam Pal, the regional relief commissioner. In Australia, the tsunami warning was lifted after only small rises in the sea level were measured at Cocos Island and the Christmas Islands. But officials warned residents to stay away from the ocean, warning that dangerous waves and currents could still affect beaches, harbors and rivers for several hours.

Indonesia, the world's largest archipelago, is prone to seismic upheaval due to its location on the so-called Pacific "Ring of Fire," an arc of volcanos and fault lines encircling the Pacific Basin.

In December 2004, a magnitude-9 earthquake struck off Sumatra island and triggered a tsunami that killed more than 230,000 people in a dozen countries, including 160,000 people in Indonesia's westernmost province of Aceh.