A port facility in Hamburg, Germany. (Morris MacMatzen/Getty Images)

Growth in the global economy is gradually picking up, but it remains under threat from rising protectionism and the risk of trade wars, the International Monetary Fund said Tuesday.

The international organization slightly raised its projections for global growth this year in its semiannual World Economic Outlook report, to 3.5 percent from a previous forecast of 3.4 percent. It expects growth to further strengthen to 3.6 percent in 2018, up from just 3.1 percent in 2016, it said.

Growth is largely due to a rebound in advanced economies, as investment, trade and manufacturing continue to recover following the recession, the report says. Commodity prices are also rebounding as global demand rises and oil prices recover from ultra-low levels, reducing the risk of deflation.

The United States is leading advanced countries in its growth momentum, because of stronger business and consumer confidence and expectations of tax cuts after the November election. If measures like tax cuts fail to materialize in the U.S., however, the IMF may have to reassess its outlook, Maurice Obstfeld, IMF chief economist, said in a briefing Tuesday morning.

But while growth is picking up, the global economy still looks vulnerable, the IMF said, especially amid the growing threat of protectionist measures that could cut economies off from global trading partners and risk triggering a trade war.

While the report didn’t mention politicians by name, it cited growing political support in advanced economies “for zero-sum policy approaches that could undermine international trading relationships, along with multilateral cooperation more generally.”

President Trump landed in America’s highest office in part due to his protectionist trade views. Recent years have also seen a series of far-right politicians vie for office in the European Union while espousing more isolationist and protectionist sentiments. Those politicians include Marine Le Pen, a candidate in the French presidential election that begins this weekend, as well as Geert Wilders, a recently defeated candidate for prime minister in Holland.

“Our view on global trade is quite clear. We believe that trade in particular has been an important engine of growth that has lifted millions out of poverty,” Obstfeldt said in the briefing.

“But at the same time it has been associated with dislocations that come in addition to the very significant dislocations that technology has caused in labor markets in advanced countries. We think a better approach than cutting off trade or managing trade heavily is to embrace trade and the productive enhancements it brings, but also to make sure that the people who are negatively affected are not left behind,” he said.

The IMF's report blamed economic conditions for protectionist sentiment that is rising around the world.

Productivity growth, a main determinant of gains in wealth, has remained low in recent decades, weighing on the economies of wealthy countries. The gains that have been recorded have disproportionately gone to the rich, in part due to changes in technology that have put less skilled laborers out of work.

While richer countries have continued to grow, they have grown more slowly in the past decades than developing economies, and more slowly than they did in decades before. In this environment, trade has become a scapegoat for the ills of inequality.

“It is not surprising, therefore, that attitudes about international trade’s effects on jobs and wages, as measured by leading surveys, tend to be more positive in poorer economies,” Obstfeld wrote in the report.

But he cautioned against the impulse to protectionism, writing that “[c]apitulating to those pressures would result in a self-inflicted wound, leading to higher prices for consumers and businesses, lower productivity, and therefore, lower overall real income for households.”

Instead, countries should work to stop protectionist measures and ensure that gains from growth are shared widely, the IMF said.

Other risks to the global economy include faster-than-expected interest rate hikes from the U.S. central bank, which could destabilize vulnerable economies by triggering an outflow of investment, as well as unsustainably fast credit growth in the Chinese financial system.

While the IMF says China’s growth is strengthening, it also stressed the need for further policy fixes in the Chinese economy, including measures to rein in domestic credit growth, regulate the financial sector and reform state-owned enterprises.

“With those reforms, we’re confident in China maintaining stability down the road,” Obstfeld said.