LONDON — Donald Trump has been president of NATO's most powerful nation for more than 20 months. During that time, he has insulted his fellow members, suggested he might walk away from protecting them, and even shoved a prime minister.

On Sunday, Macedonia will hold a referendum that could pave the way to it becoming the 30th member of this troubled club.

The country is part of the Western Balkans — a region "in the line of fire" between Russia and the West, as then-Secretary of State John Kerry described it in 2015.

The referendum is asking Macedonians whether they want to change the country's name, which for decades has been blocking its membership to international organizations.

Even if they're finally allowed to join NATO, Macedonians could be forgiven for asking what being in the military alliance actually means if the U.S. president is often its harshest critic.

But support for NATO among Macedonians remains high, with 77 percent saying they want to join the alliance, according to a poll last month.

"Even a NATO in decline is better than the alternative for Macedonia," said Petar Arsovski, a political analyst in the country who backs joining the alliance. "NATO seems to be the only way to move the country toward a more stable path."

Many Macedonians were alarmed in July when Trump suggested he would be reluctant to defend nearby Montenegro, even though it had just joined NATO.

Ivan Stojanovski, 36, heard this interview and wondered what it meant for his own nation. "To me it seems Trump would not defend anyone except himself," Stojanovski, an IT engineer from the capital, Skopje, told NBC News.

Like many Macedonians, Stojanovski puts aside his concerns about Trump and feels NATO membership would have wider benefits.

"I don't care if Trump will defend us," added Darko Buldioski, 39, a marketing specialist. "The reason behind my support for NATO is to be part of a system that can support the country's stability and development."

NATO Secretary General Jens Stoltenberg talks to members of Macedonian army special forces in Skopje on Sept. 6. Robert Atanasovski / EPA

Many Western experts agree. "The Western Balkans is not an area of great stability at the moment," said Judy Dempsey, a nonresident senior fellow at Carnegie Europe.

The region has been in a tug-of-war between Russia and NATO for years. Russia opposes Sunday's vote, with its ambassador saying Macedonia could become a "legitimate target" if relations between Moscow and NATO deteriorate further.

That is a concern for a country like Macedonia, which is less populous than Kansas, inhabited by just over 2 million people, and smaller in size than Massachusetts.

Albanian flags fly in the Macedonian village of Arachinovo, where the majority of the population is Albanian. Robert Atanasovski / AFP - Getty Images

Russia aside, many see danger in the tension between the country's ethnic Macedonians and its large minority of ethnic Albanians. Calls to redraw Balkan borders have recently resurfaced elsewhere in the region, and there are fears Macedonia could be next.

"We are seeing this unravel in front of our eyes," Arsovski said. "Borders in the Balkans have been redrawn so many times we do not take them for granted, unless they are guaranteed by a bigger security mechanism like NATO."

However, Sunday's referendum is far from a simple yes-no question on the military alliance.

Before it can join NATO and the E.U., the country must hurdle one major obstacle. Since Macedonia declared independence in 1991, Greece has blocked its membership to these international clubs because it objects to the country's name.

This feud has roots 2,500 years ago when a part of both countries fell under Alexander the Great's ancient kingdom of Macedon. Today, Greece has a region called Macedonia, and says Macedonia the country is laying claim to Greek culture — and perhaps even territory.

A protest against the naming agreement reached by Greece and Macedonia in the Greek city of Thessaloniki on Sept. 8. ARIS MESSINIS / AFP - Getty Images

The deadlock may finally be about to break. Both countries, now ruled by left-wing, less nationalist parties, have come to an agreement: The Republic of Macedonia should be renamed the Republic of North Macedonia.

"This is the only opportunity for Macedonia, and we must act quickly to see positive results," according to Jasmin Redjepi, 36, an aid worker from Skopje.

But there is another problem: Many Macedonians are deeply upset at the proposed name change.

Many support NATO, "but not at such a dear cost of losing identity, constitutional sovereignty, revision of history books and international codes," said Biljana Vankovska, a professor at Sts. Cyril and Methodius University of Skopje.

Skeptics say this is why the words "North Macedonia" aren't featured anywhere on the referendum question itself.

A string of Western leaders have poured into Skopje ahead of the vote to try to boost enthusiasm. But there are widespread calls for a boycott of the vote, which requires a turnout of over 50 percent to pass.

"Do not persuade us to eat this poisonous fruit," the country's nationalist-backed president, Gjorge Ivanov, told the United Nations General Assembly on Thursday. This put him at odds with center-left Prime Minister Zoran Zaev and his government.

A smaller minority oppose NATO membership altogether — name change or not.

Vankovska believes that it has been mis-sold to Macedonians as a panacea that will compensate for "the ineptness" of their own political elites.

"Having been unable to deliver any well-being or progress, it was easier for them to rely on promises that once the country is admitted to NATO … it will be heaven on earth," she said. "The same applies to the E.U., of course."

Others simply favor closer ties with Russia rather than the West.

"We share same values as the Russian people," said Janko Bacev, leader of a new political party, United Macedonia, which has links to Russian President Vladimir Putin's parliamentary group. Bacev said these ties are "based on tradition, family values and respecting ... religious identity and international law."

Even some NATO supporters recognize that Trump's rhetoric poses questions for new members and the future of the alliance itself.

"I think NATO is relevant enough for Macedonia to want to join it, for several reasons," said John Lough, an associate fellow at Chatham House. "But at the moment NATO looks like a demoralized organization that is out of tune with this current U.S. president — and that does count for a lot."

Alexander Smith reported from London, and Vladimir Banic reported from Belgrade, Serbia.