Updated

China and Chad have resumed diplomatic relations after nearly a decade without formal ties, state media said, just hours after rival Taiwan pre-emptively cut ties with the central African nation.

Chinese Foreign Minister Li Zhaoxing and his Chadian counterpart Ahmad Allam-mi signed a joint communique in Beijing late Sunday agreeing to resume ties, the official Xinhua News Agency said.

China and Chad will open embassies in each other's countries and appoint ambassadors, Chad's deputy foreign affairs minister Lucienne Dillah said late Sunday.

The two countries established a formal diplomatic relationship in 1972 but ended it in 1997 when Chad's government switched its allegiance to China's rival, Taiwan. The two split amid civil war in 1949, but China still considers the self-governed island to be part of its territory.

In recent decades Taiwan has been fighting efforts by Beijing — often involving significant infusions of developmental aid — to reduce the number of Taiwan's diplomatic allies.

Beijing now is focusing on Africa, using its economic power to offer lucrative aid, trade and investment deals in exchange for oil, raw materials and diplomatic support.

Chad, a small-scale oil exporter, began pumping oil from a southern field in 2003, and exported about 133 million barrels in its first two years.

Announcing Taiwan was cutting its ties with Chad early Sunday, Taiwan Foreign Ministry spokesman Michael Lu accused China of using its status as a member of the U.N. Security Council, and its ability to influence events in neighboring Sudan, to persuade Chad to break their formal relations.

Taiwan's Foreign Minister James Huang said Chad had planned to cut its ties with Taiwan if China agreed to cease its military aid to rebel forces who are threatening to topple the Chadian government. So Taiwan ended their relations instead.

"Chad made the compromise for its own survival," Huang said.

Dillah said China will support the Chadian government "in its efforts to protect the sovereignty of the state and develop the national economy."

Taiwan had been one of Chad's major foreign allies, helping to develop its infrastructure and offering to assist it in expanding its oil industry. Huang met with Chad's leaders in N'Djamena last month to try to cement relations between the sides.

Only 24 nations now have full diplomatic relations with Taiwan. Most are small and impoverished countries in Africa, the Pacific and Latin America.