BRUSSELS - North Macedonia on Tuesday cleared the final hurdle to becoming the 30th member of the NATO military alliance after the Spanish Senate ratified its accession.

Spain’s office at NATO said that 259 of the 264 senators endorsed the move. The bill was immediately signed by King Felipe and will be submitted to the U.S. State Department for official confirmation within the next 72 hours.

Hailing the move, NATO Secretary-General Jens Stoltenberg tweeted: “With that, all Allies have welcomed our soon-to-be 30th member. Congratulations, North Macedonia!”

It marks the end of a long quest for the former Yugoslav republic. Joining NATO and the European Union has been a priority for its leaders, but a dispute with neighbouring Greece over the country’s name stalled progress for more than two decades.

North Macedonia previously was known as Macedonia, a name it shared with a Greek province. Under a 2017 deal with Athens, the country changed its name and Greece agreed to drop objections to its NATO and eventual EU membership.

Greece was the first country to ratify North Macedonia’s accession to the western military alliance. The country is expected to be given the green light to start EU membership talks in coming weeks.