TAIPEI, Taiwan (AP) _ Typhoon Dan weakened to a tropical storm today as it headed north toward Taiwan's outlying islands of Penghu and Kinmen, forecasters said.

The storm that ravaged the Philippines would spare Taiwan's main island, forecasters said, a great relief to tens of thousands of people living in tents since last month's earthquake destroyed their homes.

But southern and central Taiwan could get hit with heavy rain from the fringes of the storm, whose center was 140 miles southwest of the Penghu Islands as of 1 p.m. local time, the Central Weather Bureau said.

Many of the tent dwellers have been relocated to military camps and school buildings, authorities said.

If the storm maintains its present course and speed, it would hit southeast China by about 9 a.m. Saturday, the bureau said.

Forecasters also warned that heavy rains could trigger rock and mudslides in central Taiwan, where the Sept. 21 earthquake's devastation was the most severe.

The typhoon swept through the Philippines earlier this week, killing at least eight people, flooding thousands of homes and causing $2 million in crop damage, Philippine officials said.