A razor-thin margin divides Modova’s electorate between those who are for and against the country joining the European Union (EU), early results show, in a vote marred by fears of Russian meddling amid the war in neighbouring Ukraine.

With more than 98 percent of the votes counted on Monday, the “yes” vote was slightly ahead at 50.03 percent, while the “no” camp – long ahead since the start of counting – stood at 49.97 percent, according to results published by the election commission.

The final result was still in the balance as President Maia Sandu, also running for re-election, blamed an “unprecedented assault on our country’s freedom and democracy”.

Hours earlier, partial results had shown between 55 to 57 percent unwilling to commit to joining the EU.

Analysts said ballots from the largely pro-EU diaspora were counted towards the end, giving the “yes” campaign a last-moment push.

While far from a major success, the results work in favour of the incumbent pro-EU President Sandu, who was running in Sunday’s elections to keep her post. Early on Monday, she had 41.91 percent of the vote with 97.7 percent of the vote counted.

The referendum and the presidential vote are seen as a test of the deeply divided nation’s willingness to keep close ties with Russia or to embark on the potentially lengthy process of joining the EU.

Sandu’s main rival in the presidential election, former Prosecutor General Alexandr Stoianoglo, had 26.32 percent of the vote, setting the stage for a November 3 run-off in the poor ex-Soviet southeast European nation.

The vote goes to a run-off if no candidate clears the 50 percent mark.

In a statement to Moldovans, Sandu said late on Sunday that there was “clear evidence” that criminal groups working together with foreign forces hostile to Moldova’s interests sought to buy off 300,000 votes, something she called “fraud of unprecedented scale”.

The run-up to the vote was overshadowed by a slew of allegations of election meddling by fugitive tycoon Ilan Shor who lives in Russia. Moscow has denied interfering, while Shor denies wrongdoing.

Earlier this month, Moldovan police accused Shor, jailed in absentia for fraud and theft, of trying to pay off a network of at least 130,000 voters to vote “no” and support “our candidate” at the elections.

Shor has openly offered on social media to pay Moldovans to convince others to vote in a certain way and said is a legitimate use of money that he earned.

In the early hours of Monday, he said Moldovans had voted against the referendum. “Today I congratulate you, you lost the battle,” he added, addressing Sandu simply as Maia.

Before the vote, Moldovan authorities took down online resources they said hosted disinformation, announced they had uncovered a programme in Russia to train Moldovans to stage mass unrest and opened criminal cases against allies of Shor.