Moldova’s presidential election will go to a runoff after a pro-Russia candidate narrowly missed winning a majority of votes.

With almost all ballots counted early on Monday, Igor Dodon won 48.26% while pro-Europe rival Maia Sandu scored 38.42%, the top finishers among the nine candidates.

Maia Sandu speaks to the media after casting her vote in Chisinau. Photograph: Roveliu Buga/AP

With no one securing a majority, a second round of voting will be held on 13 November to decide between Dodon and Sandu.

Sunday’s ballot was the first presidential election by direct vote in 20 years in this impoverished former Soviet republic.

Moldovans, angry about high-level corruption, were divided about whether to seek closer integration with Europe or rekindle links with Moscow.

Dodon has pledged to “restore broad and friendly ties with Russia”.

The former Communist party member tapped into dissatisfaction with the pro-European government that came to power in 2009.

Sandu, an ex-World Bank economist, has vowed to be tough with endemic corruption in the country of 3.5 million people. She earned praise for reforms carried out when she was education minister.

The European Union together with the US is seeking more influence over Moldova, as is Russia.