NATO's 29 members have signed an accession agreement with Macedonia, a key step toward Skopje becoming the military alliance's 30th member.
The move on February 6 followed a historic deal between Macedonia and Greece that removed Athens' objections and normalized relations between the neighbors.
Macedonian Foreign Minister Nikola Dimitrov signed the agreement along with representatives from the current 29 NATO member countries during a ceremony presided over by the alliance's chief, Jens Stoltenberg.
"Today is a historic day. All #NATO Allies have signed the Accession Protocol with Macedonia, which will bring more security & prosperity to the whole region. I look forward to the day when 30 flags will fly outside NATO HQ," Stoltenberg tweeted after the ceremony.
Macedonia and Greece last year approved an agreement under which the former Yugoslav republic agreed to change its name to the Republic of North Macedonia, paving the way for the country to join NATO and the European Union.
Speaking at a joint press conference with Stoltenberg, Dimitrov praised the leadership of Macedonian Prime Minister Zoran Zaev and his Greek counterpart, Alexis Tsipras, to resolve the name dispute.
βIt was easier to sit in the trenches of history. It was easier to even score political points by maintaining the dispute. But what they dared to do was invest political capital for the benefit of the two peoples of the two nations and the whole region and NATO as a family, as an alliance," he said.
Zaev tweeted that it was a "great, historic day for all our citizens. Today the largest security alliance in the world, NATO, has welcomed us."
Macedonia has said it expects Greece to be the first NATO member to ratify the accession protocol, after which the country will begin to call itself by its new name.
Since 1991, Greece has objected to the name "Macedonia" because it has a northern province with that name.
The name change deal, dubbed the Prespa Agreement after the border lake where it was signed last year, ends a 27-year dispute between the two neighbors.
In Athens, the speaker of Greece's parliament, Nikos Voutsis, said a ratification bill would be submitted to lawmakers on February 7 and would be voted on by February 8.
Russian President Vladimir Putin has also warned NATO against cultivating closer ties with Ukraine and Georgia, two ex-Soviet republics that also aspire to join NATO, which is headquartered in Brussels.
After the Macedonia signing protocol, Stoltenberg praised Georgia, an ex-Soviet republic that also aspires to join NATO, despite Russia's vehement opposition.
"We are very encouraged by what we see in Georgia, their commitment to reforms, the commitment to strengthening defense and security institutions, transparency, judiciary reforms," the NATO chief said.
"We will continue to support Georgia as it moves towards NATO membership," Stoltenberg also said.