FOR THE first half of 2014 officials at the World Trade Organisation (WTO) had a spring in their step. In December 2013 its 159 members, meeting in Bali, had struck a “trade facilitation agreement” (TFA)—a pledge to cut red tape at customs posts around the world. It was the first big win of the Doha round, a 13-year slog to bring down trade barriers. But on July 31st, just before ratification, India withdrew its support, prompting the deal’s collapse. Some Indian concerns with the latest round of trade talks are valid; but its actions raise existential questions for the WTO, which will celebrate its 20th birthday next January without a single trade deal to its name.

Developing countries had the most to gain from the TFA. According to the Peterson Institute for International Economics, in Washington, DC, it would create 21m jobs, almost all in poor countries. Even such a limited bargain, which does not cut tariffs, would boost developing-country GDP by $523 billion. India, among a handful of countries which receives help from the WTO to boost its trade, would have seen particularly large payoffs.

At first glance its volte-face seems surprising. The deal was negotiated by India’s previous, protectionist-minded government, yet it is the relatively business-friendly administration of Narendra Modi, the new prime minister, that has scuppered it. In truth, it was never clear if India’s farming policies could be compatible with any WTO deal.

Under the organisation’s rules, trade-distorting subsidies to farmers in a developing country cannot exceed 10% of the total value of its harvests. But under a new food-security law, India is bringing in a $4 billion-a-year scheme to provide cheap food for 800m people; and the minimum support prices the government offers to farmers, which for rice have more than doubled since 2001-02, will continue rising. If these measures breach the 10% limit, India would be open to a WTO challenge. The government insists it will not sacrifice food security on the altar of a trade deal.

In December, before India’s elections, the WTO tried to accommodate its demands with a “peace clause” that would have made the food-security programme immune from challenge for four years. But the new government was unsatisfied with the fudge, worried that come 2017 it would have little bargaining power to get a permanent exemption.

India’s hardball tactics will hurt a country struggling to shake off its protectionist reputation. Of 95 countries tracked by the World Bank in 2013, India’s exports-to-GDP ratio was 19th from bottom. Agricultural protection is high. In 2012 the European Union, rightly scorned for its own farm policies, spent the equivalent of 0.73% of GDP on agricultural support. India’s 1.15 trillion rupees ($18.8 billion) spending on food subsidies touches 1% of GDP—and has doubled since 2009. Even that is before counting subsidies to farmers for fertilisers, tractor fuel and the like.

But India’s move was not sheer petulance. Arvind Subramanian of the Peterson Institute argues that India has been let down by agreements made during the Uruguay round of trade talks that finished in the mid-1990s. At that time, rich countries were allowed to keep many protectionist policies in return for promising to reduce them progressively. India, which was deemed not to subsidise domestic agriculture at the time, was thus left with stricter limits on supporting farmers, even as it lowered its import tariffs.

The WTO could help out. The reference prices for commodities that it uses to measure handouts to producers date from 1986-88, which has the effect of exaggerating India’s protectionism. Rich countries are loth to update the reference prices, lest it open the floodgates for all sorts of other quibbles.

But India could do some things to help itself. Three things stand out. First, it could exploit another historical legacy of the Uruguay deal. It has been a more enthusiastic tariff-cutter than that deal required: it is free, for example, to raise the tariffs on vegetables from 30% to more than 100%. A commitment to keeping such tariffs low, or cutting them further, could form part of a deal whereby the WTO turns a blind eye to other subsidies even beyond 2017.