DAVOS, Switzerland — With the U.S. increasingly looking inward and China eager to take a lead on the global stage, Chinese President Xi Jinping on Tuesday cast his country as a champion of free trade and stability, a rebuke to the isolationist urges that helped carry Donald Trump to power.

Some of the elites listening in Davos, Switzerland, hailed a statesmanlike, even Barack Obama-like speech from Xi as the first Chinese head of state to attend the World Economic Forum — even if it depicted a commitment to open markets that falls short of reality.

The speech, rife with metaphor and allusions to Ali Baba, Chinese proverbs and even Abraham Lincoln, highlighted a high-brow effort to make a contrast with an incoming U.S. leader whose own words regularly stirred controversy and created new doubts about U.S. leadership in the world.

“We must remain committed to promoting free trade and investment through opening up and say no to protectionism,” Xi told an opening meeting.

“No one will emerge as a winner in a trade war,” he said.

During his campaign, Trump promised to raise tariffs on Chinese goods and declare Beijing guilty of keeping its currency artificially low. That would be a first step toward imposing sanctions. But in fact, for the past couple of years China has been intervening in markets to prop up its currency, not push it lower.

Xi made no direct reference to Trump, but his vocal support for free trade could appear ironic to other Western countries who have grumbled about commercial restrictions in China.

Foreign companies complain Beijing is reducing access to its markets for electric cars, computer security technology and other promising fields or pressing them to give know-how to potential Chinese competitors. Some say they are blocked from acquiring assets in China even as Chinese companies have been on a foreign buying spree.

“The political leadership of China never ceases to assure us that further opening toward foreign investment is a priority,” Germany's ambassador to China, Michael Clauss, said this week. “However, many companies keep telling us that their difficulties in these areas have increased.”

Beijing also faces U.S. and European complaints it is exporting steel, aluminum, solar panels and other goods at improperly low prices.

“These are very nice words,” said Nariman Behravesh, IHS chief economist, of the Xi speech. “What specific things is China going to do in terms of opening up, becoming a true engine of globalization? I like the commitments but in English we have an expression, ‘Actions speak louder than words.' Let's see what the actions are.”

Xi also stepped into other areas of international consensus, calling the Paris accord to fight climate change a “hard-won achievement,” and urging signatories to “stick to it.”

Trump, who has called climate change a Chinese hoax, has raised speculation that he might pull the U.S. out.