As if the Greeks didn't have enough to be angry about, on Monday the International Court of Justice ruled against Greece in a case brought by the Republic that would like to be known as Macedonia. The feud has been raging for 20 years. According to Greece, the name ‘Macedonia’ refers to the northern Greek region of Macedonia, and residents of the landlocked territory to their north should call their country something else. But they say that they have nothing else to call themselves, and anyway don’t see why they shouldn’t be able to use whatever name they want.

Writing about ‘the name dispute’ is a fraught endeavour. Whenever the Economist runs a piece on the subject, it races to the top of the ‘most-commented’ list. The majority of UN member-states now call the smaller country ‘Macedonia’, but reporters in Greece have lost their jobs for referring to their northern neighbour by its preferred name. Journalists urging compromise have received death threats.

In 1991, the Socialist Republic of Macedonia declared independence from Yugoslavia and sought international recognition as the Republic of Macedonia. Nearly a million Greeks protested in Athens against their using the name. Greece closed the border.

The Greeks argued that the republic was invented in 1944 by Tito, who called it ‘Macedonia’ because he had designs on northern Greece and the port of Thessaloniki. They were also offended by the evocation of ancient Macedon: modern Macedonians are Slavs, whose presence in the region dates back a mere 1500 years. And they were troubled by the republic's explicit support for ethnic Macedonians beyond their borders: many Macedonians in Greece sided with the Communists during the civil war, and suffered for it; the most vehement Macedonian nationalists are descendants of those who fled or were expelled from Greece around the time of the war.

With a war raging to the north and a closed border to the south, Macedonia turned to the international community for help. UN mediators stepped in. After two years of negotiations, Greece allowed Macedonia to enter the UN under the provisional designation ‘the former Yugoslav Republic of Macedonia’.

There were immediate problems over the question of where the country’s representative should be seated in the General Assembly. Greece objected to placing him between Luxembourg and Madagascar, and suggested he sit between Finland and France; the Macedonians refused, on the grounds that ‘former’ was a description, not a proper noun. He was finally given a chair between Thailand and Timor-Leste.

Two more years of rocky negotiations followed, and bilateral relations between Greece and Macedonia were formalised in 1995 by an ‘interim accord’ – essentially a stalling measure – between ‘The Party of the First Part’ and ‘The Party of the Second Part’, with no country names appearing anywhere in the document. Macedonia renounced claims on Greek territory, pledged not to support ethnic Macedonians in Greece, and removed from its flag the Vergina Sun, a symbol of ancient Macedon, promising to ‘cease to use in any way the symbol in all its forms’ (not taking any chances, Greece filed for an international trademark). Greece in turn pledged not to prevent Macedonia from entering international institutions, so long as such applications were made under the FYROM designation. A dedicated UN mediator was appointed, but in almost 17 years of negotiations they have been unable to settle on a name.

International opinion has been tilting towards Macedonia (on a visit to Skopje a few years ago David Cameron offered to start calling their rival ‘the Former Ottoman Possession of Greece’). Membership in Nato and the EU could help stabilise Macedonia, making the country accountable to international standards on such issues as press freedom – their record isn't great – and the treatment of ethnic minorities. It seemed there was a good chance that (the Former Yugoslav Republic of) Macedonia would be invited to join Nato at the April 2008 summit. But Greece lobbied against it, arguing that FYROM's intransigence on the name dispute made mutual trust and goodwill impossible. The bid was rejected. Macedonia took their case to the international court.

This week the court concluded that by objecting to the FYROM bid to join Nato, Greece had violated their obligations under the 1995 interim accord. A moral victory for Macedonia, but in the short term it changes nothing: the name dispute trundles on, and Macedonia is still excluded from Nato. The ruling is an embarrassment to the Greeks, though given the events of the past months, hardly a major one. But it still carries weight, making it harder for Greece to block Macedonia's bid to enter the EU – though that may seem less desirable today than it did when the case was argued last March.

As both countries are facing severe economic challenges – 31 per cent of Macedonians live in poverty, and official unemployment is 33.5 per cent; Greek’s economic woes are well known – it might seem that there are more important things to worry about than a name: on the other hand, under such volatile circumstances, there’s always the danger that the dispute could blow up into something larger.