Chinese President Xi Jinping has delivered a robust defense of globalization, arguing that economic integration has powered human advancement and improved the lives of millions of people.

"Many of the problems troubling the world are not caused by economic globalization," Xi said Tuesday at the World Economic Forum in Davos. "Whether you like it or not, the global economy is the big ocean you cannot escape from."

Xi is the first Chinese president to attend the annual gathering of political and business leaders high in the Swiss mountains.

His speech is rich in symbolism: Beijing is positioning itself as a global leader at a time when Western powers, and especially the United States, are retreating from the world stage and questioning the particular brand of globalization that now defines global trade.

"We must remain committed to free trade and investment. We must promote trade and investment liberalization," he said. "No one will emerge as a winner in a trade war."

Related: The euro cannot survive unless Europe changes

When it comes to the merits of deeper global ties, Xi was preaching to the converted.

The billionaires, CEOs and politicians who flock each year to the mountaintop retreat are the high priests of globalization. They are the architects of free trade agreements and the source of cross-border investment.

Yet, there is trouble in paradise. This year's meeting coincides with the formal handover of power in the U.S., with Donald Trump's inauguration scheduled for Jan. 20, the final day of the forum.

During the election campaign, Trump blasted international trade deals, tapping into a deep well of popular anger over globalization. He described one huge U.S.-led trade agreement -- the Trans Pacific Partnership -- as a "disaster done and pushed by special interests who want to rape our country."

Trump has repeatedly threatened to slap tariffs of 35% on goods -- especially autos -- made in Mexico. He has also threatened to penalize China for devaluing its currency (In fact, Beijing is supporting the yuan).

Xi told Davos delegates that globalization is a double-edged sword, and people around the world had felt the pain of its failings. But he said it would be a mistake to retreat into isolationism.

"The right thing to do is to seize every opportunity to jointly meet challenges and chart the right course for economic globalization," he said.

China is already pushing its own free trade deal with leaders from around the Pacific.

"If the U.S. is going to give up on economic and trading relations with Asia and the Pacific, China has an alternative plan -- not just for the Pacific and Asia, but also for Latin America," said economist Nouriel Roubini.

Related: China is ready to pounce if Trump axes Pacific trade deal

The forces of globalization served as a catalyst for China's economic development, turning the country into a manufacturing and trade powerhouse. As international trade boomed, tens of million of Chinese joined the middle class.

China's ruling Communist Party has embraced these economic benefits of globalization.

But it is much less keen on other Western values, including human rights and the open flow of information. Beijing has, for example, developed a massive internet censorship apparatus.

Its model also features economic nationalism, protecting certain industries from global competition.

Xi defended this strategy on Tuesday, saying that China has succeeded because it followed a path that was uniquely suited to its needs. It would not seek to impose its standards on other countries, he said.