Macedonian flags fly in front of the government building in Skopje
© Ognen Teofilovski / ReutersMacedonian flags fly in front of the government building in Skopje
Greece and Macedonia have signed a historic deal agreeing to the latter country changing its name after decades of dispute.

Macedonia, which sits to the north of Greece, will become known as North Macedonia under the new agreement, which was today signed by Greek prime minister Alexis Tsipras and Macedonian prime minister Zoran Zaev.

The name dispute between the two countries has existed since the break-up of the former Yugoslavia. Greece has previously argued that Macedonia's name suggests it has a claim over the Greek province which is also called Macedonia.

While nationalists on both sides have attempted to thwart any kind of agreement in the past, Macedonia is believed to have become open to the change recently in order to push through the country's membership of Nato and the EU.

Mr Tsipras called the agreement an "appointment with history", while Mr Zaev said the two countries can now call themselves "partners and allies".

The Macedonian prime minster also said he hopes the agreement between the two countries will serve as an example to other Balkan states, which have been plagued by conflicts since the break up of Yugoslavia in the final years of the Cold War.

The recent agreement, which was announced on Tuesday but signed by each country's foreign ministers today, has been met by protests on both sides.

Mr Tsipras narrowly survived a vote of no confidence yesterday after it was tabled by his opposition, the New Democracy party.

His critics called the vote after claiming he had made too many concessions to secure the agreement. However, it was rejected by 153 votes to 127.

Despite the agreement being signed by each country's foreign minister, their respective parliaments will now have to approve it.

Macedonia will also hold a referendum in September or October which will ask if voters are happy to change the country's constitution in order to change its name - a point Greek demanded to be included in the agreement.

The Macedonian president Gjorge Ivanov so far has refused to sign the agreement and has the power to temporarily veto it, which would lead to it being sent back to parliament for a second vote.

If it is passed again Mr Ivanov would be obligated to approve it.