China’s state media reported Thursday that Ji Bingxuan, Chinese Communist Party leader Xi Jinping’s special envoy to Brazil for the inauguration of conservative President Jair Bolsonaro, delivered a personal letter from Xi to the new president and received “warm greetings” to send back to Beijing.

The Global Times, a state-run media outlet, added that Bolsonaro appeared enthusiastic to expand relations with China.

“The prospect for cooperation between the two countries will surely become better and better,” Bolsonaro reportedly told Ji during their meeting Wednesday. He also reportedly said that “China and Brazil are both great countries and the new government of Brazil attaches great importance to cooperation with China and is willing to push forward bilateral relations.”

Ji related Xi’s desire to see a growing Chinese role in Brazil, reportedly stating that Beijing seeks to “strengthen all-round exchanges, deepen pragmatic cooperation in various fields and develop closer multilateral coordination, to promote greater development of comprehensive strategic partnership between the two countries” during Bolsonaro’s tenure.

China’s Foreign Ministry also expressed enthusiasm in discussing ties with Bolsonaro.

“I would like to reiterate that China’s cooperation with Brazil and other Latin American countries featuring mutual respect, equality and mutual benefit serves the respective interests as well as the common interests of China and Latin American countries,” ministry spokesman Lu Kang told reporters on Wednesday. “Brazil, an important emerging market, clearly knows where its interests lie and certainly need no preaching from others.”

The friendly exchange between Bolsonaro and a representative of the largest communist country in the world comes as something of a surprise given Bolsonaro’s statements about wanting to distance Brazil from China on the campaign trail, as well as his call for a global right-wing coalition against communism in a conference appearance last month. Bolsonaro the candidate infuriated Beijing by visiting Taiwan, a tacit acknowledgment of its status as a sovereign country. He also warned in remarks last year that “China is not buying in Brazil, China is buying Brazil,” suggesting that he would work to distance Brazil’s economy from China as president.

Bolsonaro more broadly called for the world to unite against communism in remarks to the Conservative Summit of the Americas, a one-day conference uniting right-wing Latin American voices in Brazil. He argued that Brazil had an “obligation” to curb the influence of China’s closest allies in the region, Cuba and Venezuela, and offer free and democratic alternatives.

These actions reportedly inspired the government of American President Donald Trump to seek a closer relationship with Brazil, given that Trump has prioritized diminishing China’s global influence while in office. The Brazilian magazine Veja published a report quoting anonymous State Department sources saying that Trump expects a visit to Washington from Bolsonaro soon and hopes to actively compete to elbow China out of the Brazilian market.

Secretary of State Mike Pompeo, following his meeting with Bolsonaro in Brasilia this week, similarly said, “We will work against these authoritarian regimes,” citing, once again, Cuba and Venezuela.

Bolsonaro disinvited envoys from both Cuba and Venezuela from his inauguration, issuing a statement on Twitter that initially appeared to apply to China, as well: “Naturally, regimes that violate the freedoms of their people and act openly against the future government of Brazil because of their ideological affinity for the group defeated during the [Brazilian] elections will not be at the 2019 inauguration. We defend and truly respect democracy.”

China has not personally attacked Bolsonaro, instead publishing government-approved articles where columnists argue that Brazil is culturally inferior to China and will never properly develop its economy because Brazilians are lazier and less adept than the Chinese.

“It may sound racist to differentiate development based on culture. But after living in Brazil for a while, you will find out the answer,” one article claimed. “To be honest, Brazil does not compare well with China.”

Bolsonaro nonetheless welcomed the Chinese envoy on Tuesday. Experts speculate that Brazil’s economy is simply too weak for Bolsonaro to keep to his word of fighting communism around the world.

“If to us the relationship with China is vital, because of our trade balance, for China it is also important to keep a good relationship with Brazil,” Brazilian professor Severino Cabral told the People’s Daily, the official newspaper of the Communist Party of China, last month. “If the relations are important to both sides, things must be carried on with prudence.”

Follow Frances Martel on Facebook and Twitter.