(Adds details)

TAIPEI, Nov 5 (Reuters) - A 5.7 magnitude earthquake rattled much of Taiwan on Thursday, but there were no immediate reports of damage or casualties, officials and witnesses said.

The epicentre of the quake, which struck at 5:32 p.m. (0932 GMT) was in Nantou County of central Taiwan, the Central Weather Bureau said in a statement.

The US Geological Survey said the epicentre of the quake was at a depth of 7.4 miles.

Local TV showed images of buildings shaking and people running for exits.

A local rail system said for safety reasons it had stopped trains near the quake site.

World No. 1 contract chipmaker TSMC

2330.TW

TSM.N

said its plants were not affected.

Earthquakes occur frequently in Taiwan, which lies on a seismically active stretch of the Pacific basin.

One of Taiwan's worst-recorded quakes occurred in September 1999, near Thursday's epicentre. Measuring 7.6 on the Richter scale, it killed more than 2,400 people and destroyed or damaged 50,000 buildings.