A strong 6.0 magnitude quake hit off the Pacific island nations of Tonga and Samoa on Sunday but there was no tsunami alert, seismologists said.

The US Geological Survey said the earthquake struck at 4:39 pm (0339 GMT) around 237 kilometres southwest of the Samoan capital Apia at a depth of 41 kilometres.

Nine people died in September when a tsunami hit the northern Tongan island of Niuatoputapu following an 8.0-magnitude earthquake. The tsunami also killed 143 people in Samoa and another 34 in neighbouring American Samoa.

A 5.6-magnitude earthquake also rocked Taiwan on Sunday, swaying buildings in the capital Taipei, the island's Seismology Centre said, but there were no immediate reports of damage or casualties.

The quake hit at 0352 GMT about 31 kilometres northeast of Pingtung county at a depth of 20 kilometres.

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

Taiwan is regularly hit by earthquakes as the island lies near the junction of two tectonic plates. A similar situation occurs on the Pacific "Ring of Fire" where continental plates in the Earth's crust meet.