TAIPEI/BEIJING (Reuters) - Taiwan offered “immediate” congratulations to Brazilian President-elect Jair Bolsonaro, Taiwan’s Foreign Ministry said on Tuesday, as a Chinese newspaper warned him not to cultivate ties with the island Beijing claims as its own.

A supporter of Brazil's new president-elect, Jair Bolsonaro, wearing a piece of cloth with an image of his face, gestures outside his condominium at Barra da Tijuca neighborhood in Rio de Janeiro, Brazil October 29, 2018. REUTERS/Pilar Olivares

In the run-up to the election, Bolsonaro had portrayed China, its largest trading partner, as a predator looking to dominate key sectors of its economy.

Bolsonaro’s friendly leanings towards self-ruled, democratic Taiwan are likewise vexing to Beijing, which considers the island a breakaway province. Bolsonaro in February became the first Brazilian presidential candidate to visit Taiwan since Brazil recognized Beijing as the sole Chinese government under the “one China” policy in the 1970s.

Taiwan’s Foreign Ministry said in a statement that its representative office in Brazil had offered the Taiwan government’s “immediate” congratulations to Bolsonaro.

It also noted his visit to Taiwan earlier this year, where it said he had gained “further understanding” about Taiwan’s national situation and economic development, which would help with cooperation and exchanges going forward.

Brazil, like most countries, only has formal diplomatic ties with China, not Taiwan, which China says has no right to state-to-state relations.

Taiwan now has formal relations with only 17 countries worldwide, many of them small, less developed nations in Latin America and the Pacific.

Widely read Chinese state-run tabloid the Global Times said on Tuesday that it would take Bolsonaro “some time to get familiar with foreign policy”.

“If he continues to disregard the basic principle over Taiwan after taking office, it will apparently cost Brazil a great deal,” it said.

“As many Latin American countries have walked away from Taiwan, the Chinese island won’t bring any more benefits to Brazil, which Bolsonaro and his team must be aware of.”

China has been focusing its attention on taking away more of Taiwan’s Latin American allies and has so far this year won over El Salvador and the Dominican Republic.

China on Monday congratulated Bolsonaro after the far-right lawmaker won the election in a dramatic swing away from the left in the world’s fourth-largest democracy.