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.

Macedonia/Greece Border Crisis Show all 10 1 /10 Macedonia/Greece Border Crisis Macedonia/Greece Border Crisis Macedonia Border Crisis Migrants attempt to pass the Greek-Macedonian border guarded by Macedonian police near the town of Idomeni, northern Greece AFP/Getty Macedonia/Greece Border Crisis Macedonian Border Crisis A migrant reacts as he carries a child during clashes with Macedonian police at the Greek-Macedonian border Reuters Macedonia/Greece Border Crisis Macedonia Border Crisis A Macedonian policeman armed in riot gear clashes with a migrant girl, police have reinforced control at the border with Greece in a bid to stop the influx of migrants, but a few hundred Syrians managed to cross the frontier overnight AFP/Getty Macedonia/Greece Border Crisis Macedonia Border Crisis Macedonian special policemen guard the border as more than a thousand immigrants wait at the border line Reuters Macedonia/Greece Border Crisis Macedonia Border Crisis Migrant men help a fellow migrant man holding a boy as they are stuck between Macedonian riot police officers and migrants during a clash near the border train station of Idomeni, AFP/Getty Macedonia/Greece Border Crisis Macedonia Border Crisis A barbed wire fence lines the border of Macedonia and Greece near the Gevegelija Railway station, Macedonian special policemen are guarding the border as more than a thousand immigrants wait at the border line of Macedonia and Greece Reuters Macedonia/Greece Border Crisis Macedonia Border Crisis Macedonian Police stand firm at the Greek-Macedonian border in a bid to stop the influx of migrants AFP/Getty Macedonia/Greece Border Crisis Macedonia Border Crisis Government of Macedonia has declared the state of emergency in the region of country's southern and northern border and in accordance with the law to open a possibility for appropriate engagement of the army of Macedonia AFP/Getty Macedonia/Greece Border Crisis Macedonia Border Crisis Macedonian police drove back crowds of migrants and refugees trying to enter from Greece on Friday after a night spent stranded in no-man's land by an emergency decree effectively sealing the Macedonian frontier. Reuters Macedonia/Greece Border Crisis Macedonia Border Crisis A migrants woman with childrens wait to pass the Greek-Macedonian border, guarded by Macedonian police near the town of Idomeni, northern Greece AFP/Getty

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.