Macedonias ruling conservatives and the opposition Social Democrats both claimed victory in snap elections held in the hope of solving a two-year long deep political crisis.
"VMRO-DPMNE is the winner of this election," Nikola Gruevski, party leader and prime minister since 2006, told supporters at the party's headquarters.
However, shortly afterwards the opposition Social Democrats (SDSM) also claimed to have won.
"We are the winners!" Social Democrat leader Zoran Zaev told a cheering crowd of supporters in front of the government building in central Skopje.
"We have one more seat, we are waiting for the final results ... but the trend is clearly in our favour."
According to analysts, with the results too close to call it was not possible to provide a reliable projection on the number of seats each side will have in parliament until the last votes are counted.
For voters, the most important outcome will be to get a government capable of regaining stability after the long political crisis.
"What do I expect? I expect this agony to end," 55-year-old Zoran Milevski told AFP after he cast his ballot at a school-turned-polling station in central Skopje.
The vote was called as part of a European Union-brokered deal between Macedonia's four main political parties after a mass wiretapping scandal erupted in February 2015 and sparked rival street protests.
No major incidents were reported during the day, electoral officials said, although observers warned of some irregularities. However, none of the parties has complained about the process or results so far.
The turnout was higher than at previous elections, around 66 percent.
Wiretapping allegations led Gruevski of the nationalist VMRO-DPMNE party to step down in January after nearly 10 years in power -- paving the way for Sunday's snap election.
The vote, which was twice delayed owing to international concerns over fraud, pitched the ex-PM against his nemesis Zaev.
It was Zaev who released tapes last year that appeared to show the government had wiretapped thousands, including journalists and religious officials, as well as alleging high-level corruption.
Gruevski denied the claims and accused Zaev of planning a coup with foreign support.
Zaev, 42, has pitched the vote as a choice between "doom or life" and pledged to stop an exodus of young people from the former Yugoslav republic, which remains one of Europe's poorest countries.
"Whoever wins the election will have huge challenges and issues to solve," Zaneta Trajkoska, director at the Institute of Communication Studies, told AFP.
Following the neck-and-neck results for the VMRO-DPMNE and SDSM, ethnic Albanian parties will likely emerge as the kingmaker, in a country where a quarter of the population is Albanian.
Albanian insurgents fought Macedonian forces in an uprising 15 years ago, leading to an agreement giving the minority group more rights.
Macedonia aspires to join both the EU and NATO but accession has been blocked by Athens owing to a dispute over the country's name -- Greece has a northern region also called Macedonia.
The latest EU progress report on Macedonia said democracy and rule of law had been "constantly challenged" in particular by "state capture", referring to the considerable influence of private interests on state decisions.
Analysts however suggest Europe has brushed aside concerns because of Gruevski's role as a "gatekeeper" in the refugee crisis, in which hundreds of thousands of migrants have entered landlocked Macedonia from Greece on their way to western Europe.
The refugee wave has put added pressure on the public purse in Macedonia, where the average net wage is around 360 euros ($380) a month and unemployment stands at nearly 24 percent.