Want in on NATO? That can be easier said than done.

WASHINGTON — A national referendum on changing Macedonia’s name passed with overwhelming support Sunday, paving the way for the nation to join NATO as the alliance’s 30th member.

The referendum, pushed by Prime Minister Zoran Zaev, received international attention in recent weeks, with U.S. Secretary of Defense Jim Mattis and German Chancellor Angela Merkel, among other world leaders, traveling to Skopje to show support for the vote.

The result: upholding Zaev’s agreement with Greece to name the former Yugoslav republic to “North Macedonia.” Greece, arguing its neighbor's name implied territorial ambitions on its own province of the same name, has blocked Macedonia's efforts to join NATO since 1990; Greece has agreed to drop its opposition with the name change.

Pentagon spokeswoman Dana White issued a statement following the results, saying the department “strongly” supports the vote and calling it a “historical moment.” Defense officials in Washington have been vocal with their support of Macedonia coming into NATO, with Mattis, during his visit to Skopje, noting it would represent a blow to Russia.

In July, NATO formally opened the door for Macedonia to join the alliance if the name referendum passed, with NATO Secretary General Jens Stoltenberg warning that the vote represents a “once in a lifetime” chance for the nation to enter the alliance.

In a joint statement Monday, Stoltenberg and President of the European Union Donald Tusk praised the vote, saying: “The name agreement between Athens and Skopje has created a historic opportunity for the country to join the transatlantic and European community as an equal member. This would change the life of the people of the country and that of their children for the better.”

“It is now in the hands of politicians in Skopje to decide on the way forward,” the two added. “The decisions they take in the next days and weeks will determine the fate of their country and their people for many generations to come. We encourage them to seize this historic opportunity.”

Low turnout marred what should have been a major victory for Zaev and his supporters. Results from more than 97 percent of polling stations showed 91.3 percent of voters approving the deal. However, turnout stood at just 36.8 percent, a far cry from the massive support for which the government had hoped.

Opponents to the name change had called for a boycott of the vote and celebrated in the street outside parliament when turnout figures were announced, chanting slogans and waving flags.

"The people made a great choice and said 'yes' to our future. It is time for lawmakers to follow the voice of the people and to provide support," Zaev said. "There will be no better agreement with Greece, nor an alternative for NATO and the EU."

The agreement faces more hurdles before it can be finalized. If the constitutional amendments are approved by Macedonia’s parliament, Greece will then need to ratify it. But Greek Prime Minister Alexis Tsipras faces political problems of his own. His governing coalition partner, right-wing Independent Greeks head Panos Kammenos, has vowed to vote against the deal, leaving Tsipras reliant on opposition parties and independent lawmakers to push it through.

Should everything go right, Macedonia will begin the long process of joining the alliance. How long remains to be seen, with analysts predicting the process will not be finished by the time world leaders gather for the 2020 NATO Summit.

With Elena Becatoros and Konstantin Testorides of The Associated Press. AP reporters Ivana Bzganovic and Nicolae Dumitrache in Skopje and Demetri Nellas in Athens, Greece, contributed to this report.