Updated

Greece and neighboring Macedonia have been at loggerheads for more than a quarter-century century over an issue at the heart of the newer nation's existence and identity: its name.

The term "Macedonia" is a source of such nationalist fervor on both sides that the dispute has left the Balkan country without a universally recognized name and unable to join international institutions such as NATO.

The country emerged from the breakup of Yugoslavia in 1991, and was recognized by the United Nations in 1993 under the provisional name Former Yugoslav Republic of Macedonia. International institutions still use that officially, although more than 130 countries simply refer to Macedonia.

A flurry of recent talks between officials from the two countries, coupled with a new, more moderate government coming to power in Macedonia, have led to optimism that a solution might finally be within reach. U.N. mediator Matthew Nimetz presented new proposals on the potential name at talks in New York Wednesday and said he should know within two months whether progress can be made.

Here's a look at the history of the conflict and the reasons why a resolution might be possible now.

___

WHAT'S THE ISSUE?

Macedonia managed to gain independence while avoiding the bloodshed that engulfed much of the rest of the Yugoslavia as the federation disintegrated in the early 1990s. But as the new nation sought to forge an identity for itself, its efforts rankled some neighbors — and Greece most of all.

Greece claims the use of the term Macedonia harbors territorial claims on its own northern province of the same name, and points to nationalist maps that have circulated at times in Skopje showing an enlarged Macedonian state engulfing much of northern Greece.

Athens was also outraged by what it saw as the usurpation of the legacy of the ancient Greek warrior king Alexander the Great.

The dispute led to Athens declaring a trade embargo on its northern neighbor in 1992 in a bid to prevent it from being recognized as the "Republic of Macedonia."

With nationalist fervor mounting on both sides, Athens and Skopje reached an Interim Accord in 1995 under which Macedonia agreed to make concessions in return for Greece lifting the crippling trade embargo.

Macedonia had to amend its constitution to renounce claiming a Macedonian national minority in Greece. It also conceded to changing its national flag, which had borne the "Star of Vergina" emblem. The use of the 16-rayed ancient Greek solar symbol had been seen as a provocation by Athens because of its links to the dynasty of Alexander the Great.

___

WHY NOW?

Hopes of a breakthrough have been fueled by a change in government in Skopje after years of the nationalist government of conservative Nikola Gruevski.

The country's new left-wing prime minister, Zoran Zaev, who has been at the helm for just seven months, has taken bold steps to improve relations with Macedonia's neighbors and boost his country's prospects for joining NATO and the European Union.

He has set Greece and the name dispute at the top of his agenda.

So far this month, the two countries' foreign ministers met for closed-door talks in the northern Greek city of Thessaloniki and Macedonia's deputy prime minister for European affairs, Bujar Osmani, travelled to Athens for an official visit. Speaking after the trip, Osmani expressed optimism the name issue could finally be resolved.

"I feel there is a general feeling of fatigue in both countries due to this long-lasting dispute," Osmani told The Associated Press. "What I think is important is that we have achieved substantial progress in confidence building between the two countries," he said.

In Athens, Greek Deputy Foreign Minister Yannis Amanatidis also appeared hopeful.

Speaking after Wednesday's preliminary talks in New York, UN mediator Nimetz said if it appeared progress could be made, the issue might be resolved in six months. The 78-year-old Nimetz, a former U.S. undersecretary of state in President Jimmy Carter's administration, has been dealing with the issue for more than 20 years, first for the United States and then for the U.N. secretary-general.

Western countries also have a rekindled interest in expanding NATO to counter what they see as increased Russian influence in the region.

___

ROAD BACK TO TALKS, AND THOSE WHO OPPOSE IT

Repeated attempts at U.N.-brokered negotiations have failed to resolve the issue, despite dozens of ideas being proposed for Macedonia's new name.

The Greek side suggests a "compound name" that features a geographic or other historical qualifier, such as "upper," ''northern," or "new" might be acceptable. The government in Skopje has expressed fears about where the qualifier would be placed — for example, New Republic of Macedonia versus Republic of New Macedonia. It argues the adjective's placement could result in a change of Macedonian national identity.

In 2008, Athens vetoed Skopje's attempt to join NATO under its provisional name. Macedonia sued Greece in the International Court of Justice over the veto, which ruled Greece had been unlawful in blocking its neighbor's accession.

Macedonia was granted candidate status in 2005 to join the European Union. But prospects for joining the bloc are slim unless the name issue is resolved, as Greece is a full member and could again block Skopje's membership.

Nimetz, the U.N. mediator, said after Wednesday's talks it would not be realistic to expect any future name not to include the term "Macedonia" in some form.

If the governments on both sides manage to find common ground, both will have to persuade nationalists in their countries to accept the deal.

Greece's position is complicated by the fact that its current government is a coalition of the left-wing Syriza party and the small nationalist Independent Greeks. The small party's leader, Defense Minister Panos Kammenos, has voiced opposition to accepting a permanent name that includes the word "Macedonia."

A protest march is scheduled Sunday in Thessaloniki, the capital of Greece's Macedonia province.

____

Elena Becatoros in Athens contributed.