EVEN with the best will in the world—which, in 2014, has not been conspicuously forthcoming—the outgoing year could not be regarded as one of the planet’s finest. Between war, disease and insurrection, the past 12 months have often seemed a gory relay for the apocalypse’s four horsemen. But look closely, and amid the misery there have been reasons for optimism. Whether by dint of boldness or stoicism, there are numerous candidates for the coveted title of The Economist’s country of the year. In fact 2014 was a bad year for the very concept of countries, as well as for lots of individual nations. The pre-modern marauders of Islamic State (IS) rampaged between Iraq and Syria, and Russian forces dismembered Ukraine, as if borders were elastic lines rather than fixed frontiers. Boko Haram traduced the sovereignty of Nigeria while the Shabab convulsed the Horn of Africa. South Sudan, a brand new country born only three years ago, imploded in civil war.

But other territories have bravely resisted disintegration. The Marshall Islands may be sinking but, by championing the struggle against climate change, they are at least going down fighting. The peshmerga of Iraqi Kurdistan—not yet a country but perhaps on its way to that status—repelled the jihadists of IS and may have saved Baghdad. In a different, democratic kind of confrontation, but in its way an equally vigorous one, the people of Scotland wisely voted not to end three centuries of union and stayed in the United Kingdom. That would make Scotland a good candidate for our title, except that lauding it as a country because it chose not to become one might seem gallingly contrarian.

Disaster has been averted elsewhere, too. Senegal responded with alacrity to its Ebola outbreak (as indeed did Nigeria). Afghanistan remains one of the world’s bleakest places, but it looks a little less bleak after a peaceful handover of power: the Taliban are still slaughtering people, but politically they are a busted flush. Tiny Lebanon deserves a mention for absorbing hundreds of thousands of Syrian refugees, plus the machinations of malignant outsiders, and continuing, just about, to function. If the peace process between Colombia’s government and its FARC guerrillas succeeds, it will be a favourite for our award in 2015.

On our home turf of economics there have been some standout performances. Ireland and Iceland have both pulled clear of trouble, showing that democracies can, after all, implement painful decisions when they must. Unusually among euro-zone countries, Estonia has kept its nose clean. Narendra Modi’s victory in India may come to be seen as the moment the world’s biggest democracy began to realise its vast potential. We may find that out in 2015, too.

And the winner is…

Yet there is more to life and to statecraft than guns and GDP: witness our choice in 2013 of Uruguay, for its liberal stance on drugs and gay marriage. (Uruguay has had another strong year, notching up a model election, impressive growth and a grown-up welcome to six internees from Guantánamo.) The two top contenders for our 2014 title earned their kudos for displays of political maturity that, like most great achievements, involved both leaders and their people.

The runner-up (just) is Indonesia, the world’s largest Muslim nation, where a modern politician bested the old, militaristic regime in a fair if rancorous vote. The new, reforming president, Joko Widodo, has begun to nudge his country beyond its crossroads and towards prosperity.

Our winner is a much smaller nation, but we think symbolism matters more than size. The idealism engendered by the Arab spring has mostly sunk in bloodshed and extremism, with a shining exception: Tunisia, which in 2014 adopted a new, enlightened constitution and held both parliamentary and presidential polls (a run-off is due in the latter on December 21st). Its economy is struggling and its polity is fragile; but Tunisia’s pragmatism and moderation have nurtured hope in a wretched region and a troubled world. Mabrouk, Tunisia!