TAIPEI: At least nine people were killed and more than 900 injured Wednesday by a powerful earthquake in Taiwan that damaged dozens of buildings and prompted tsunami warnings that extended to Japan and the Philippines before being lifted.

Dozens of people were believed safe but unreachable in areas cut off by massive landslides triggered by the quake -- many in tunnels that cut through the mountains that bisect the island from north to south.

Officials said the quake was the strongest to shake the island in decades, and warned of more tremors in the days ahead.

Strict building regulations and widespread public disaster awareness appear to have staved off a major catastrophe for the earthquake-prone island, which lies near the junction of two tectonic plates.

“We were very lucky,“ said a woman surnamed Chang, who lived next door to a printing press warehouse near the capital that virtually pancaked in the quake, but all 50 inside at the time were plucked to safety.

“Many of the decorations at home fell on the floor, but people were safe.”

Wu Chien-fu, director of Taipei's Central Weather Administration's Seismology Center, said the quake was the strongest since one of 7.6-magnitude struck in September 1999, killing around 2,400 people in the deadliest natural disaster in the island's history.

Wednesday's magnitude-7.4 quake hit just before 8:00 am local time (0000 GMT), with the United States Geological Survey (USGS) putting the epicentre 18 kilometres (11 miles) south of Taiwan's Hualien City, at a depth of 34.8 kilometres.

Three people among a group of seven on an early-morning hike through the hills that surround the city were crushed to death by boulders loosened by the earthquake, officials said.

Separately, the drivers of a truck and a car died when their vehicles were hit by tumbling rocks, while another man died at a mine quarry.

The National Fire Agency did not immediately offer details on the other three deaths, but said all the fatalities had been in Hualien county, adding that 946 people had been injured without specifying how seriously.

Social media was awash with shared video and images from around the island of buildings swaying as the quake struck.

“It was shaking violently, the paintings on the wall, my TV and liquor cabinet fell,“ one man in Hualien told broadcaster SET TV.

Dramatic images were shown on local TV of multi-storey structures in Hualien and elsewhere tilting after the quake ended, while a printing warehouse in New Taipei City crumbled.

The mayor there said more than 50 survivors had been successfully plucked from the ruins of the structure.

Local TV channels showed bulldozers clearing rocks along the main route to Hualien, a mountain-ringed coastal city of around 100,000 people that has been cut off by landslides.

The main roads leading to the city pass through an extensive series of strongly built tunnels -- some of them kilometres long -- and officials said dozens of people could be trapped in vehicles inside.

Dozens of miners were also out of reach at a quarry in Hualien.

“We must carefully check how many people are trapped and we must rescue them quickly,“ president-elect and current Vice-President Lai Ching-te told reporters in Hualien.

Engineers were also working to repair the main railway track that runs south from the capital down the eastern seaboard, which had been cut off in several places.

- Regional impact -

In Taiwan, Japan and the Philippines, authorities initially issued tsunami warnings but by around 10;00 am (0200 GMT), the Pacific Tsunami Warning Center said the threat had “largely passed”.

In the Taiwanese capital, the metro briefly stopped running but resumed within an hour, while residents received warnings from their local borough chiefs to check for any gas leaks.

Across the Taiwan Strait, social media users in China's eastern Fujian province and elsewhere said they also felt strong tremors.

Residents of Hong Kong also reported feeling the earthquake.

China, which claims self-ruled Taiwan as a renegade province, was “paying close attention” to the quake and “willing to provide disaster relief assistance”, state news agency Xinhua said.

Fabrication at Taiwan Semiconductor Manufacturing Company -- the world's biggest chip maker -- was briefly interrupted at some plants, a company official told AFP, while work at construction sites for new plants was halted for the day.