Zoran Zaev, leader of the Social Democratic Union of Macedonia (SDSM), greets supporters in front of the government building after parliamentary elections in Skopje on December 11, 2016 | Robert Atanasovski/AFP via Getty Images EU, NATO urge Macedonian leader to allow new government The Social Democratic Union of Macedonia said it has secured a coalition.

The European Commission and NATO urged the president of the former Yugoslav Republic of Macedonia, Gjorge Ivanov, Sunday to abide by the country's constitution and allow the formation of an opposition-led government, as the tiny Balkan country faced a crucial test of democratic norms.

Ivanov’s party, VMRO-DPMNE, has controlled the government since 2006 and has largely dominated the country’s politics since 1990. But while the center-right VMRO-DPMNE finished first in parliamentary elections in December, winning 51 seats, it failed to form a government, which requires a coalition of at least 61 MPs.

The Social Democratic Union of Macedonia (SDSM), which finished second in the elections with 49 seats, says it has secured a coalition and is demanding a mandate from Ivanov to form a government and install the party's leader, Zoran Zaev, as prime minister.

Zaev said he had clinched the needed votes by forging a deal with the country’s largest Albanian party, the Democratic Union for Integration (DUI), and smaller Albanian parties.

“After nearly 11 years of living under a regime, we have the chance to form a new democratic government of Macedonia,” Zaev said in a statement, according to the Macedonian Information Agency, the official news service. Ivanvov has said he would give a mandate to form a government to a coalition with 61 votes, provided it would not “violate the unitary character of Macedonia.”

Zaev’s deal apparently includes support for a law that would give Albanian status as an official language, a move that could give Ivanov a basis for trying to block the new government.

In what appeared to be a last-ditch power play, Nikola Gruevski, the leader of VMRO-DPMNE, issued a statement late Sunday night offering to back a Zaev-led government, but only if Zaev abandoned the language law and other proposals Gruevski insisted would splinter the country along ethnic lines.

“If Zaev insists so badly to be prime minister, we will let him implement his program so long as he doesn’t attack the state and national interests,” Gruevski said, according to the MIA news service.

In an angry statement that bordered on a rant, Gruevski offered to be "arrested, imprisoned, harassed," if needed to protect the country, and alleged that foreign meddlers including an unnamed foreign ambassador and George Soros, the billionaire civil-society activist, were trying to weaken Macedonia and have Zaev “enthroned” as prime minister.

In a statement on Sunday, Johannes Hahn, the European commissioner for neighborhood policy and enlargement negotiations, urged Ivanov to allow the formation of the SDSM-led government.

“As enough signatures of MPs have been collected,” Hahn said, “We now expect the president to give the mandate to form the next government to the candidate from the parties which have the majority in the assembly, in line with the constitution.”

In a pointed warning, Hahn continued, “Change in democratic societies is natural and should be embraced, when it is a result of credible elections. Accepting and respecting the election result and the right of leaders to try to form a government is a sign of a mature democracy. Obstructing and undermining such efforts has no place in a democratic process.”

He added, “We call on all relevant actors, including the president and the parliament, to act fully in line with the constitution’s letter and spirit and in a responsible manner, to enable a swift formation of a government that will address overdue reforms.”

In a statement, NATO Secretary General Jens Stoltenberg noted that the December parliamentary elections were “well-administered” and also called for Ivanov to let the process move forward.

“Following one attempt to form a government, it has been announced that, in line with the requirement specified by the president, enough MPs' signatures have now been collected,” Stoltenberg said. “I look to the authorities in Skopje to fulfill the next step in the democratic process. I call on all parties to exercise restraint in statements and actions, and take decisions for the benefit of all citizens.”