SKOPJE, Macedonia (AP) — NATO's secretary-general urged Macedonia on Thursday to solve its 25-year-old name dispute with alliance member Greece and proceed with wide-ranging reforms if it wants its membership bid to succeed.

Jens Stoltenberg said he "strongly welcomes" the small Balkan country's efforts to join NATO — a decade after the dispute with neighboring Greece halted an earlier accession effort.

"But while it is good to be ambitious, it is also important to be realistic," Stoltenberg said in an address to the Macedonian parliament in the capital, Skopje.

"There is still much hard work to be done," he added. "That means, of course, resolving the issue of your country's name. It's an issue that has weighed on this region — and this country — for far too long."

Greece maintains that its neighbor's name implies a territorial claim on its own adjoining province of Macedonia. Macedonia, a former Yugoslav province that peacefully gained its independence in 1991, denies that, arguing that it covers an area that has been known as Macedonia for a long time.

International institutions formally recognize the country as the Former Yugoslav Republic of Macedonia, the name Greece insists on, though many countries prefer plain Macedonia.

"I should be honest with you . There is no other way to join NATO until an acceptable solution on the name is found. There is no plan B," Stoltenberg told a press conference after talks with Prime Minister Zoran Zaev.

While praising measures already passed by Macedonia's new government, Stoltenberg called for progress on electoral and media reform, as well as greater transparency in government finances.

Stoltenberg said he welcomes the willingness Zaev's left-led government has shown to solve the name dispute since it came to power seven months ago — replacing a conservative administration.

Both Greek and Macedonian officials have voiced hopes the dispute can be resolved within months.

Negotiators from both sides met in New York on Wednesday at a meeting held by the U.N. mediator on the issue. Shortly after the talks, the Macedonian government said the outcome would depend "on the willingness to compromise on both sides."

Earlier, Macedonian negotiator Vasko Naumovski said the proposals presented by U.N. mediator Matthew Nimitz were "far from a dignified solution."

About a hundred protesters held a peaceful demonstration in central Skopje against their country's NATO accession, burning an alliance flag as Stoltenberg addressed parliament.