North Macedonia's electoral commission said early Thursday that with nearly 94% of the vote counted the Social Democrats have 36% and VMRO-DPMNE follow at more than 34%.
The ethnic Albanian Democratic Union for Integration was third at 11%, while a coalition of two smaller ethnic Albanian parties followed at nearly 9%. The Commission gave no projections on how many seats each party stood to win in the 120-member parliament.
Shortly afterwards, Social Democrats leader Zoran Zaev declared victory.
Earlier, a suspected hacking attack caused the site of the commission to crash for hours after polls closed in national elections Wednesday, delaying preliminary results that showed the pro-Western Social Democrats narrowly leading the center-right opposition.
Addressing cheering supporters in the capital Skopje, he promised fast reforms to help the country's European Union accession hopes end revive the battered economy.
Electoral commission head Oliver Derkoski said the suspected hack affected the official website designed to give fast online results. Vote counting was proceeding normally as the commission's central server was not affected, he said. Derkovski added that police have been informed and will investigate the attack and who might be behind it.
Another official told The Associated Press that "an outside hacker attack spread a virus … so the public cannot see the results online."
"Our technical team is working to solve the problem," he said, speaking on condition of anonymity as he was not authorized to discuss the matter with the media.
The election — delayed for months due to the pandemic — was held amid a resurgence of the coronavirus in the small Balkan country, with voters donning obligatory masks.
Polling stations closed later than usual to encourage turnout, and authorities also organized two days of advance voting to allow people in quarantine or at greater risk from the virus to cast their ballots from home.
North Macedonia, a former Yugoslav republic with a population of around 2 million, reported more than 8,500 cases, including 393 deaths, as of Wednesday, with 198 new cases and four deaths reported over the previous 24 hours. The country saw new cases rise in recent weeks after infection-control restrictions were lifted.
Election authorities said turnout had reached 50.8% half an hour before polls closed, which is lower than in previous elections.
Zaev's governing Social Democrats called the early parliamentary election when he resigned as prime minister in January after the European Union failed to give North Macedonia a start date for EU membership talks.
Zaev faced a strong challenge from VMRO's Hristijan Mickoski. The party has softened its earlier opposition to a landmark 2018 deal with Greece that saw the country change its name from Macedonia to North Macedonia, clearing objections for it to join NATO earlier this year.
Zaev, 45, ran much of his campaign on the accomplishment of securing the agreement with Greece that ended a dispute of nearly 30 years.
"I believe our positive campaign has won over citizens," Zaev said after voting.
North Macedonia has had a caretaker government since his resignation as prime minister in January.
Election campaigns were limited by social distancing rules and calmer than in past elections, which produced vitriolic animosity between the two main parties.
The Social Democrats have governed since 2016 after beating populist conservative Nikola Gruevski of VMRO-DPMNE, who fled to Hungary to avoid serving a two-year jail sentence for abuse of power and corruption.
Gruevski's successor, Hristijan Mickoski, moved the party toward the center-right but aimed his campaign at voters are still disappointed by the country's name change.
"People are going to the polls in large numbers from what we can see," Mickoski said. "They are ready for a big change."
If neither party can achieve an outright victory, the winner will most likely have to seek a power-sharing deal with parties representing the country's large ethnic Albanian minority.
The election is being monitored by a team of international observers.