Early results based on a fraction of the vote showed 56% of Moldovans voting "no" at Sunday's referendum on their EU aspirations and put incumbent Maia Sandu just a few percentage points ahead of her rival in the presidential election.
The results given on the Central Election Commission's website were changing in real time but could represent a major political setback for Sandu's pro-Western government if they hold.
With 34% of ballots counted, the election commission gave Sandu 35% of the vote, putting her only just ahead of Alexandr Stolianoglo, 57, a former prosecutor-general backed by the pro-Russian Party of Socialists, whom it gave 29%.
That result would pave the way to a potentially tight second round run-off against Stolianoglo.
Though the results may still change as more ballots are counted, particularly among the large Western-based diaspora, they are almost certainly a shock for Sandu's team.
Polls had indicated she was polling comfortably ahead of Stolianoglo and other politicians, though they noted that many voters were still on the fence when the surveys were conducted.
The run-up to the votes were overshadowed by a slew of allegations of election interference by Russian-backed tycoon Ilan Shor. Russia denied any meddling, while Shor denied wrongdoing.
Moldova has alternated between pro-Western and pro-Russian courses since the 1991 break-up of the Soviet Union.
Ties with Moscow have deteriorated under Sandu. Her government has condemned Russia's invasion of Ukraine, accused Russia of plotting her overthrow, and diversified energy supply after Russia reduced gas supplies.
Oazu Nantoi, a lawmaker for Sandu's Party of Action and Solidarity or PAS party, put down the result to what he said was Russian "hybrid" interference, including disinformation.
"We are in the gray zone and under great influence of Putin. It is obvious that preliminary results reflect real numbers," he said by telephone.