China's Xi Jinping tells Davos: 'No one will emerge as a winner in a trade war.'

china great firewall panama papers xi jinping
Chinese President Xi Jinping in Berlin, March 28, 2014. Xi has warned against economic protectionism. JOHANNES EISELE/AFP/Getty Images

Chinese President Xi Jinping has attacked protectionism and warned of the dangerous consequences of a "trade war" in his first keynote speech at the World Economic Forum in Davos.

Xi is attending the annual summit, where business and political elites gather to discuss global problems, for the first time.

This year's event comes against a backdrop of rising anti-free trade and anti-globalization sentiment, including the election of Donald Trump as president of the United States on a protectionist, nationalist platform.

Xi's speech on Tuesday did not mention Trump—who is not attending Davos—by name. But the Chinese premier's statements on climate change and on trade liberalization contrasted with positions taken by the President-elect.

"We must remain committed to developing free trade and investment," Xi said, "Promote trade and investment liberalization… and say no to protectionism.

"Pursuing protectionism is just like locking oneself in a dark room: While wind and rain may be kept outside, so are light and air.

"No one will emerge as a winner in a trade war."

Trump's combative stance on China and protectionist trade policy were cornerstones of his election platform. He has repeatedly said he will get "tough" on the Asian superpower, and during the campaign vowed to impose a 45 percent tariff on Chinese goods.

Xi also used his speech on Tuesday to restate China's commitment to the Paris climate accord, agreed in 2015. "The Paris agreement is a hard won achievement which is in keeping with the underlying trend of global development," Xi said, "all signatories should stick to it in instead of walking away from it." China is entering its third year of a "war on pollution," which involved Beijing imposing $21.8 million of fines on people for violating environmental protection laws in 2016.

Trump had said on the campaign trail that he would "cancel" the Paris agreement, which was ratified last year, but since his election has softened his position, saying he has an "open mind" on continued U.S. involvement.