BEIJING (Reuters) - China on Monday offered congratulations to Brazil’s new president, Jair Bolsonaro, after the far-right lawmaker won the Brazilian election in a dramatic swing away from the left in the world’s fourth-largest democracy.

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.

Chinese Foreign Ministry spokesman Lu Kang said China is willing to continue deepening cooperation for the benefit of people in both countries.

“Developing China-Brazil relations is in fact the wide consensus of all sectors in both countries,” Lu said.

Chinese diplomats based in Brasilia have met twice with top Bolsonaro advisors in recent weeks, according to participants in the meetings.

Their aim is to highlight cooperation with Latin America’s largest country, whose grain and minerals have fueled China’s rise while lifting millions of Brazilians from poverty in the resulting commodities boom.

Bolsonaro’s friendly leanings toward Taiwan are likewise vexing to Beijing, which considers Taiwan a renegade 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.

Lu said that the “one China” principle, which refers to China’s claims that Taiwan is an inseparable part of it, was a common principle recognized by the international community.