A 7.2 magnitude earthquake rocked Taiwan on Wednesday, the strongest tremor to hit the island in at least 25 years, killing four people, injuring dozens and sparking a tsunami warning for southern Japan and the Philippines that was later lifted.
Taiwan's government said four people had died in the mountainous, sparsely populated eastern county of Hualien where the epicentre was, with more than 50 injured.
At least 26 buildings have collapsed, more than half in Hualien, with about 20 people trapped and rescue work on-going, it said.
Taiwan television stations showed footage of buildings at precarious angles in Hualien, where the quake struck just offshore around 8:00am (00:00GMT) as people were going to work and school.
The quake had a depth of 15.5km (9.6 miles), according to Taiwan's Central Weather Administration.
"It was very strong. It felt as if the house was going to topple," said 60-year-old Taipei hospital worker Chang Yu-Lin.
Japan's weather agency said several small tsunami waves reached parts of the southern prefecture of Okinawa, and later downgraded the earlier tsunami warning to an advisory. It put the earthquake's magnitude at 7.7.
The Philippines Seismology Agency also issued a warning for residents in coastal areas of several provinces, urging them to evacuate to higher ground.
Taiwan also issued a tsunami warning, but reported no damage from that, and the Pacific Tsunami Warning Center in Hawaii later said the risk of damaging tsunami waves had passed.
Aftershocks could still be felt in Taipei, a Reuters witness said, with more than 25 aftershocks registered, according to Taiwan's central weather administration.
Chinese state media said the quake was felt in China's Fujian province, while a Reuters witness said it was also felt in Shanghai.
The Taipei city government said it had not received any reports of major damage and the city's MRT was up and running soon after the tremor.
Electricity operator Taipower said more than 87,000 households in Taiwan were still without power, adding that the country's two nuclear power stations were not affected by the temblor.
Taiwan's high speed rail operator said no damage or injuries were reported on its trains, but noted trains will be delayed while it carries out inspections.
Semiconductor giant Taiwan Semiconductor Manufacturing Co (2330.TW), opens new tab said it had evacuated some fabrication plants and its safety systems were operating normally.
"To ensure the safety of personnel, some fabs were evacuated according to company procedure. We are currently confirming the details of the impact," according to the company.
It later added that those evacuated were beginning to return to their workplaces.
Shares of TSMC were down 1.4% in early trade, while Apple (AAPL.O), opens new tab supplier Foxconn's stock fell more than 2% and shares of flat panel maker Au Optronics dropped 1.7%.
Taiwan's official central news agency said the quake was the biggest to hit the island since 1999 when a 7.6 magnitude tremor killed around 2,400 people and destroyed or damaged 50,000 buildings in one of Taiwan's worst-recorded quakes.
Taiwan's Central Weather Administration said the earthquake registered the second-highest intensity of an "Upper 6" in Hualien county, on the 1-7 intensity scale.
In an Upper 6 earthquake, most unreinforced concrete-block walls collapse and people find it impossible to remain standing or move without crawling, the Japan Meteorological Agency says.