IT WAS a veritable tale of two cities. On February 4th Macedonians ambled around the centre of their capital, Skopje, enjoying a quiet Sunday. Athens, meanwhile, was jammed with protesters against any compromise in the 27-year-old dispute about what Greece will accept as a name for its northern neighbour. The organisers claimed a crowd of 1.5m; the police put it at a still-impressive 140,000. After a flurry of diplomatic activity, a deal could be struck within weeks. If so, it would be a huge breakthrough—and put pressure on the other Balkan states to solve their own disputes with their neighbours.

The roots of the conflict run deep. When the Ottoman Turks were driven from the region in 1912, Macedonia was carved up by Greece, Serbia and Bulgaria. The bits grabbed by Serbia ended up as part of the new Yugoslavia. When Yugoslavia collapsed in 1991, Greece objected to that part of it being recognised as the Macedonian republic, arguing that this implied a claim to its own region of the same name. From then on Greece, the United Nations, the EU and many other international organisations have had to call it FYROM—the Former Yugoslav Republic of Macedonia.

In 2008, breaking an agreement with Macedonia, Greece used its effective veto to stop the country from joining NATO, and has since prevented it from even starting EU accession talks. A UN mediation process got nowhere. But now a recent change of government in Skopje and greater goodwill in Athens offer a real chance of a resolution.

Among names being circulated are Upper Macedonia, Northern Macedonia, New Macedonia and Macedonia (Skopje). But the terminological difficulties do not end there. For example, even if everyone agreed on Upper Macedonia but the Greeks insisted that in future its people must be called “Upper Macedonians” who speak “Upper Macedonian”, then, says Nikola Dimitrov, Macedonia’s foreign minister, there will be no deal. “Macedonians need to be assured they will remain Macedonians,” he insists.

Time is of the essence, says Mr Dimitrov. Macedonia wants an agreement as soon as possible so it can get an invitation to join NATO and open negotiations with the EU in the next few months. To help things along, from February 6th Skopje’s airport will no longer be called Alexander the Great, a source of immense irritation to the Greeks. After the NATO rebuff the previous Macedonian government had begun to claim symbols which the Greeks had considered theirs alone, but Mr Dimitrov’s government has rowed back on this. “National identity can’t be projected back to the time of Alexander the Great,” he says. “I agree with [the Greek prime minister] Alexis Tsipras that 2,300 years ago there were no nations. We are the result of historical processes.”

Although it is clear that Mr Tsipras would like a deal too, his government relies on the support of a small nationalist party which objects to compromise. The Greek opposition can use the issue to beat the government with, and the costs to Greece of failing to strike a deal would be small. But that would leave Macedonia “locked in the waiting room”, unable to progress to either the EU or NATO, says Mr Dimitrov. “It is the forces of the past battling the forces of the future...Myths, glorious defeats and victories and pride are all important. We can’t change the past, but we can shape the future.”

On February 6th the European Commission unveiled a new Balkan enlargement strategy. It is aimed at revitalising the otherwise stalled accession process of the six western Balkan states: Albania, Bosnia-Herzegovina, Macedonia, Montenegro, Serbia and Kosovo. A breakthrough on Macedonia might demonstrate to the rest of the region that no outstanding issue is too difficult to solve.