Chinese President Xi Jinping said Tuesday that globalization has powered worldwide growth and should not be blamed for the world's problems.

In an attack on the anti-globalization rhetoric that has led to the election of Donald Trump as U.S. president and the Brexit vote in Britain, Xi told a packed audience at the World Economic Forum at Davos: "It is true that economic globalization created new problems, but this is no justification to write off economic globalization altogether.

"Rather we should adapt to and guide economic globalization, cushion its negative impacts and deliver its benefits for all countries."

Xi's speech marked the first time a Chinese head of state has visited the business summit. He used the forum to promote inclusive globalization and warn that populist approaches can lead to war and poverty. He also warned that tit-for-tat trade controls would benefit no one.

"No one would emerge as a winner in a global trade war," he said. "Pursuing protectionism is just like locking one's self in a dark room. Wind and rain might be kept outside but so are light and air."

The Chinese president said the world is full of contradictions and that globalization had become viewed as a "Pandora's box" by many people, hinting at the populist movements that have spread across Western nations in the last year.