Taipei: A strong earthquake struck southeastern Taiwan, bringing at least one building down in a small town and tearing up roads as forecasters said the threat of a regional tsunami had passed.

The quake hit at 2:44 pm (0644 GMT) about 50 kilometres (30 miles) north of the city of Taitung at a depth of 10 kilometres, the United States Geological Survey said.

Its initial strength was given as magnitude 7.2 but USGS later downgraded it to a 6.9-magnitude quake. Taiwan's weather bureau recorded it as 6.8-magnitude.

Japan's Meteorological Agency and the Pacific Tsunami Warning Center issued tsunami advisories shortly after the quake, but both later sent updated bulletins saying there was no longer a threat of high waves.

In the Taiwanese town of Yuli, a building that hosted a 7/11 convenience store on the ground floor collapsed.

Video footage posted by Taiwan's Central News Agency showed panicked residents running towards the building, which had caved in and sent up a thick cloud of dust.

Taiwan Railways Administration (TRA) said a train derailed in Dongli station in Hualien after it was hit by concrete from an overhead canopy that came loose during the quake.

Photographs released by CNA showed the train's six carriages leaning at an angle in the station.

TRA said the 20 onboard passengers were evacuated and no injuries were reported.

Shaking was also felt in the capital Taipei and the southwestern city of Kaohsiung, with residents posting videos of chandeliers and paintings swaying on social media.

Taiwan's President Tsai Ing-wen urged people to be vigilant for further aftershocks in the coming hours.

"Water and electricity supplies in some areas are also affected by the earthquake," she wrote on Facebook. "The related disaster relief work is in full swing."

- Broken bridge, swimming pool waves -

Many expressed the kind of resilience that comes with living on an island that frequently experiences earthquakes.

In one video posted online, a man said he was trapped on a bridge where the road at either end had collapsed into a twisted mess of tarmac and concrete.

"This is troublesome," he could be heard saying. "The whole bridge is broken".

In another Facebook post, Ou Chin Te shared footage from the swimming pool on the 60th floor of The One -- a skyscraper in Kaohsiung and Taiwan's fourth-highest building.

The tremors had turned the pool into a wobbly mass of waves.

"It's shaking super big, I'm on 60th floor, it's so scary," a laughing man could be heard saying in the video.

A 6.6-magnitude quake hit the same region on Saturday and there have been multiple tremors since, with minimal damage in what is a mountainous and sparsely populated rural region.

But Sunday's quake was much stronger.

The China Earthquake Network Centre said tremors were felt in coastal areas including Fujian, Guangdong, Jiangsu and Shanghai.

Taiwan is regularly hit by earthquakes as the island lies near the junction of two tectonic plates.

The mountainous island sits on the "Ring of Fire", an arc of intense seismic activity that stretches through Southeast Asia and across the Pacific basin.

Most of Taiwan's population lives on the flat western coast and in the capital Taipei.

The scenic eastern coast is more remote and less populated but a major tourist draw.

There are few international tourists in Taiwan these days because the island maintains mandatory Covid quarantine for most arrivals.

Taiwan is regularly hit by quakes and most cause minimal damage but the island also has a long history of deadly tremors.

Hualien, a tourist hotspot, was struck by a 6.4-magnitude earthquake in 2018 that killed 17 people and injured nearly 300.

In September 1999, a 7.6-magnitude quake killed around 2,400 people in the deadliest natural disaster in the island's history.