Chisinau has applied to join the European Union following Russia's invasion of Ukraine in 2022.
Moldova's EU accession referendum is on the brink with almost 100% of the vote counted. Pro-European President Maya Sandu, who won the first round of the presidential vote, accused "criminal groups working together with foreign forces" of interfering - a veiled reference to Russia.
The close vote is a setback for Sandu, who will face a tough second round.
The referendum was expected to go through better in the country of 2.6 million people bordering Ukraine.
Chisinau applied to join the European Union after Russia invaded Ukraine in 2022.
With more than 98% of the votes counted, the "yes" vote was 50.08%, while the "no" camp received 49.92%.
Sandu pointed out that Moldova has witnessed "an unprecedented assault on the freedom and democracy of our country, both today and in recent months," blaming "criminal groups working together with foreign forces hostile to our national interests."
In the presidential election, Sandu received almost 42% of the vote and will face his closest rival, Alexandre Stoyanovoglo, in a second round on 3 November.
The former prosecutor, backed by pro-Russian socialists, garnered a higher-than-expected result of more than 26% in a race with 11 competitors in total.
The referendum result - even if it results in a narrow victory for the pro-European camp - "weakens the pro-European image of the population and of the leadership of Maya Sandou," Florent Parmentier, a political scientist at Sciences Po in Paris, told AFP.
Describing the result as a "surprise", he said the figure would not affect accession talks with Brussels, which began in June this year, although a resounding "yes" would have been a "clear positive signal".
Parmentier added that the results "do not bode well for the second round" for Sandu, noting that many of the people who backed the other nine candidates on Sunday were more likely to vote for Stoyanov in the second round.
Sandu, 52, a former World Bank economist and Moldova's first female president who defeated the Moscow-backed incumbent in 2020, was the clear favorite in the race. Polls also predicted a referendum victory.
Sandu's critics say she has not done enough to fight inflation in one of Europe's poorest countries or reform the judiciary.
In his campaign, Stoyanoglo, who was sacked as prosecutor by Sandu, called for a "restoration of justice" and promised to pursue a "balanced foreign policy".
Stoilov, 57, abstained from voting in the referendum.
In Chisinau, voter Genadi, who declined to give his last name, said he was worried about the country's "Western" leaning and believed the government was "worsening the situation" economically.
Another voter, Olga Chernega, a 60-year-old economist, explained that she had come to vote "for prosperity, peace and well-being in our country."
An unprecedented vote-buying scheme
Fears of Russian interference are growing.
Washington recently issued a new warning about alleged Russian interference and the EU has imposed sanctions against several Moldovan citizens.
Moscow has categorically denied accusations of interference.
Police have made hundreds of arrests in recent weeks after uncovering an "unprecedented" vote-buying scheme that they say could taint up to a quarter of ballots cast in the country of 2.6 million people.
Police said millions of dollars from Russia aimed at bribing voters had been transferred into the country by people linked to Ilan Shore, a fugitive businessman and former politician.
Convicted in absentia last year of fraud, Schor regularly branded Moldova a "police state" and a "compliant puppet of the West".
"You have failed miserably," Shore wrote on social media after the election.
In addition to the alleged vote-buying, police say they have found that hundreds of young people were trained in Russia and the Balkans to create "mass disorder" in Moldova, such as using tactics to provoke law enforcement. | BGNES