China and Nauru formally re-established diplomatic relations Wednesday, after the tiny South Pacific nation cut ties with Taiwan.

The foreign ministers of the two countries held a signing ceremony in Beijing, an AFP journalist saw.

In a post-election blow to Taiwan, Nauru unexpectedly announced last Monday that it would no longer recognize Taiwan "as a separate country" but "rather as an inalienable part of China's territory".

After 22 years of diplomatic relations with Taiwan, Nauru recognised China in July 2002, before switching back to Taiwan in May 2005.

This month's decision was seen as major coup for Beijing -- Nauru was one of the few countries to officially recognise Taiwan on a diplomatic basis.

Only 12 states, including the Holy See, now fully recognise Taiwan.

In a large room with a bay window overlooking a lake at the capital's Diaoyutai State Guesthouse, China's top diplomat Wang Yi and his Nauru counterpart Lionel Aingimea signed a document and raised glasses to toast the formal resumption of ties.

"Although China and Nauru are geographically far apart and separated by vast oceans, the friendship between the two peoples has a long history," Wang said.

"Both countries are developing countries, and both sides are faced with the common task of developing economy, improving people's livelihood and realizing modernisation."

Aingimea said: "We look forward to this new chapter of the relationship of Nauru and China. It'll be built on strength, built on development strategy."

Nauru -- population 12,500 -- is one of the world's smallest countries and lies about 4,000 kilometres (2,500 miles) northeast of Sydney.