Protesters waving Macedonian flags. Boris Grdanoski/AP Images

The 29 NATO members signed off Wednesday on Macedonia joining the bloc, 28 years after it became independent.

Macedonia couldn't join before because neighboring Greece kept blocking it, citing a longstanding dispute over the country's name.

The logjam was broken when Macedonia agreed to formally rename itself the Republic of North Macedonia.

NATO approved its newest member on Wednesday after Macedonia agreed to change its name to secure admission.

All 29 members of NATO signed the accession protocol for Macedonia, beginning a process of ratification that is likely to result in the Balkan state joining the world's most powerful military alliance.

Macedonia has been trying to join NATO since it became independent 28 years ago. But every application had been blocked by neighboring Greece because of a regional dispute over Macedonia's name.

Greece agreed to stop blocking Macedonia if it formally renamed itself the Republic of North Macedonia. Lawmakers in both countries in June agreed to the deal, known as the Prespa Agreement, which is due to take effect soon.

Permanent representatives of the 29 members of NATO signed the Accession Protocol for the future Republic of North Macedonia in Brussels on Wednesday. NATO

Greece objected to the name Macedonia - which the country adopted in 1991 when Yugoslavia collapsed - because Macedonia is also the name of a region of Greece. Politicians in Greece argued that the name suggested the country had ambitions to one day rule Greek Macedonia as well.

Greece also argued that Macedonia was wrongly associating itself with the historical figure Alexander the Great, also known as Alexander III of Macedon, even though he came from modern-day Greece.

Macedonian Foreign Minister Nikola Dimitrov told the Turkish newspaper Yeni Safak last month that the name change could happen in "a matter of days."

The name Alexander spread through Europe in the 4th century thanks to Alexander the Great. Wikimedia Commons

According to NATO's processes, all 29 members, including Greece, would need to ratify the accession.

Any country could technically veto it. But that's unlikely, as the only one to object had been Greece until the Prespa Agreement: Macedonia would change its name, and in return Greece would stop blocking its NATO membership.

Protesters hold a Greek national flag depicting Alexander the Great during a rally against the use of the name "Macedonia" in any solution to a dispute between Athens and Skopje over the former Yugoslav republic's name. Reuters

If the other 29 members ratify the accession, Macedonia would then pass its own ratification legislation, at which point it would become a NATO member.

The decision to change the name split the country. An advisory referendum late last year was rejected because of low voter turnout. The country's parliament later agreed to the change.

NATO Secretary-General Jens Stoltenberg described Wednesday as "a historic day."

The latest country to join NATO was Montenegro in 2017. Bosnia and Herzegovina, Georgia, and Ukraine have expressed interest in joining.

Countries aspiring to join NATO have to demonstrate that they are in a position to further the principles of the 1949 Washington Treaty and contribute to security in the Euro-Atlantic area.

They are also expected to meet certain political, economic, and military criteria, including spending a minimum proportion of gross domestic product on their militaries.

NOW WATCH: Popular Videos from Insider Inc.