Brazil's President Jair Bolsonaro gestures before a meeting with China's President Xi Jinping ahead of the BRICS summit in Brasilia, Brazil November 13, 2019. REUTERS/Adriano Machado

BRASILIA (Reuters) - Brazil President Jair Bolsonaro said on Thursday he would not be drawn into the protracted U.S.-China trade dispute, and that Brazil was free to trade with whatever country it chooses.

Speaking in Brasilia where leaders of the BRICS group of countries were meeting, Bolsonaro said the summit was like a gathering of “old friends.” Without giving details, he said that “good things are coming.”

China is Brazil’s biggest trade partner, but since taking power in January, Bolsonaro has cozied up to U.S. President Donald Trump, raising questions of whether he might pick a side in the trade war.

Asked about Russian and Chinese criticism of U.S. protectionism, Bolsonaro refused to be drawn in.

“I am not in this trade war, Brazil is trading with the whole world,” Bolsonaro told reporters.

On Wednesday, at the close of the BRICS Business Forum, Bolsonaro said Brazil was working to become an increasingly attractive market for foreign investment and wanted to open up to the world.

BRICS comprises five member states - Brazil, Russia, India, China and South Africa.

Bolsonaro, a fan of Trump who has sought closer ties with the world’s No. 1 economy, criticized China - Brazil’s top trading partner - during last year’s presidential campaign but has since been more pragmatic towards it.