Illustration by David Simonds

THIS Christmas the world economy offers few reasons for good cheer. As credit contracts and asset prices plunge, demand across the globe is shrivelling. Rich countries collectively face the severest recession since the second world war: this week's cut in the target for the federal funds rate to between zero and 0.25% (see article) shows how fearful America's policymakers are. And conditions are deteriorating fast too in emerging economies, which have been whacked by tumbling exports and the drying-up of foreign finance.

This news is bad enough in itself; but it also poses the biggest threat to open markets in the modern era of globalisation. For the first time in more than a generation, two of the engines of global integration—trade and capital flows—are simultaneously shifting into reverse. The World Bank says that net private capital flows to emerging economies in 2009 are likely to be only half the record $1 trillion of 2007, while global trade volumes will shrink for the first time since 1982 (see article).

This twin shift will force wrenching adjustments. Countries that have relied on exports to drive growth, from China to Germany, will slump unless they can boost domestic demand quickly. The flight of private capital means emerging economies with current-account deficits face a drought of financing as well as export earnings. There is a risk that in their discomfort governments turn to an old, but false, friend: protectionism. Integration has less appeal when pain rather than prosperity is ricocheting across borders. It will be tempting to prop up domestic jobs and incomes by diverting demand from abroad with export subsidies, tariffs and cheaper currencies.

The lessons of history, though, are clear. The economic isolationism of the 1930s, epitomised by America's Smoot-Hawley tariff (see article), cruelly intensified the Depression. To be sure, the World Trade Organisation (WTO) and its multilateral trading rules are a bulwark against protection on that scale. But today's globalised economy, with far-flung supply chains and just-in-time delivery, could be disrupted by policies much less dramatic than the Smoot-Hawley act. A modest shift away from openness—well within the WTO's rules—would be enough to turn the recession of 2009 much nastier. Incremental protection of that sort is, alas, all too plausible.

Fair-weather free-traders

In many countries politicians' fealty to open markets is already more rhetorical than real. In November the leaders of the G20 group of big rich and emerging economies promised to eschew any new trade barriers for a year and to work hard for agreement on the Doha round of trade talks by the end of December. Within days, two of the G20 countries, Russia and India, raised tariffs on cars and steel respectively. And the year is ending with no Doha breakthrough in sight.

As economies weaken, popular scepticism of open markets will surely grow. Among rich countries, that danger is greatest in America, where grumbles were heard long before recession set in. The new Congress, with bigger Democratic majorities, has a decidedly less trade-friendly hue. Barack Obama's campaign rhetoric left an impression of a man in two minds about trade, which he has since done nothing to dispel.

Now that their exports are faltering, emerging economies too may become less keen on trade. The WTO's rules allow them plenty of scope: after two decades of unilateral tariff-cutting most of their tariffs are well below their “bound” rates, the ceilings agreed in the trade club. On average they could triple their import levies without breaking the rules.

Handouts to the ready

Politicians from Washington to Beijing are being pressed to help troubled industries, regardless of the consequences for trade. A bail-out of Detroit's carmakers, whatever its final extent, will be a discriminatory subsidy. As China's exporters go bust by the thousand, industries from textiles to steel have been promised handouts and rebates. Subsidies will beget more subsidies: Nicolas Sarkozy, France's president, says that Europe will turn into an “industrial wasteland” if it too does not prop up its manufacturers. They will also invite retaliation. With China's bilateral trade surplus at a record high even as America's economy slumps, Congress will not take kindly to Beijing's bolstering of its exporters.

Exchange-rate movements could also prompt protectionist responses. Chinese officials have said publicly that they will not push down the yuan, and their currency has risen in trade-weighted terms. However, it did slip against the dollar in late November. Viewed from America, China still seems to be following a cheap-yuan policy. A Sino-American trade spat is all too plausible.

Add all this together and it is hard for a free-trader not to worry. So what is to be done? The first requirement is political leadership, especially from America and China. At a minimum, both must avoid beggar-thy-neighbour policies. Second, a conclusion of the Doha round would help. A deal would reduce the risk of broader backsliding by cutting many countries' bound tariffs—and it would establish Mr Obama's multilateral credentials. Third—Doha deal or not—is greater transparency. A good recent idea is that the WTO publicise any new barriers, whether or not they are allowed by its rules.

The best insurance against protectionism, however, is macroeconomic stimulus. Boosting demand at home will reduce the temptation to divert it from abroad. By historical standards policymakers are acting aggressively, as the Federal Reserve did this week. But the effort is unevenly, and poorly, distributed. Emerging economies from which capital is fleeing have little room to boost spending. Some creditor countries (notably Germany) are holding back on fiscal stimulus, while the world's biggest borrower (America) is acting the most boldly. A bigger push to boost domestic demand in creditor countries coupled with more help, through the IMF, to cushion cash-strapped emerging economies would ease the world economy's adjustment and brighten the prospects for free trade. In the 1930s protectionism flourished largely because of macroeconomic failures. That must not happen this time.