KIEV — Russia will respect the result of Ukraine’s presidential election, Russian President Vladimir Putin said Friday, as fighting continued in the country’s restive eastern regions two days ahead of the crucial poll.
The conciliatory sentiment raised hopes that Russia will be willing to work with new authorities in Ukraine after months of denouncing as illegitimate the acting government that replaced pro-Kremlin president Viktor Yanukovych, who was ousted in February amid popular protests.
‘‘We understand and see that people in Ukraine want the country to come out of this lengthy crisis,’’ Putin said at a conference in St. Petersburg. ‘‘We also want the situation to become calmer. We will respect the choice made by the people of Ukraine.’’
He also said he hoped that his nation’s relations with the United States, currently at Cold War-era lows, will improve after Ukraine’s crisis is resolved. But, he said, ‘‘we can’t force anyone to love us.’’
There were reports Friday of further clashes between pro-government and antigovernment militias near the eastern Ukrainian city of Donetsk, a day after intense fighting in the region killed at least 13 soldiers and raised tensions ahead of Sunday’s vote.
The Ukrainian Defense Ministry said Friday that 20 pro-Russian insurgents were killed and more than 30 wounded a day earlier when 500 rebels attacked a Ukrainian military position near the eastern town of Rubizhne. The account could not immediately be confirmed independently, and there was no explanation of why it took authorities so long to release the details.
In a separate incident near the town early Friday, one soldier was killed when Ukrainian troops were ambushed by rebels, the ministry said.
Local media also reported heavy shelling Friday in the rebel stronghold of Slovyansk. A 10-minute video posted online, ostensibly from Slovyansk, showed smoke rising from points across a residential landscape amid the repetitive thuds of artillery fire.
A top Russian military commander said Russia would respond to NATO’s troop buildup in Poland and the Baltics, where alliance forces are conducting exercises. The statement by Valery Gerasimov, head of Russia’s Armed Forces General Staff, added to tensions between Russia and the West that have reached Cold War levels.
‘‘In this situation, we cannot ignore these events. We have to take measures in response,’’ Gerasimov told reporters Friday at an international security conference in Moscow, Interfax reported.
The Thursday clashes prompted Ukrainian officials to call for an emergency meeting of the UN Security Council and broke several days of relative calm amid reports of divisions in the separatist ranks.
The United States and its European allies have accused Russia of sowing chaos in eastern Ukraine to throw off the election, and they have threatened Moscow with additional sanctions if the vote is disrupted.
Acting President Oleksandr Turchynov said Thursday that the 13 Ukrainian troops were killed when rebels attacked a checkpoint with automatic weapons and rocket-propelled grenades near the town of Volnovakha, south of Donetsk. A regional health official later said that 16 people had died.
Witnesses said the attackers arrived in a bank’s armored car, which the unsuspecting soldiers waved through the checkpoint, only to be mowed down at point-blank range.
The Foreign Ministry also said Ukrainian border guards repelled an attack Wednesday by ‘‘several groups of armed militants’’ who were trying to enter the country from Russia.
Describing one of the attacks, the Interior Ministry said in a statement that three trucks and a sport utility vehicle attempted to cross the border in the Luhansk region late Wednesday but that the border guards fired warning shots and the cars raced back into Russia.
Ukrainians are scheduled to go to the polls Sunday in presidential and mayoral elections that could determine the direction of the country and its alignment between Russia and the West.
Pro-Russian separatists in its eastern region have declared the vote illegal and been actively seeking to halt it.
At district election commission No. 42 here, for example, a group of about 10 armed men from the self-proclaimed People’s Republic of Donetsk arrived last week to tell the employees their work was done. Their message was clear: There will be no presidential election in Ukraine this Sunday if the pro-Russian separatists have their way.
‘‘I was terrified and locked the door,’’ said Elvira Maslova, 51, a receptionist who works down the hall.
Separatists have targeted other election offices in the Donetsk region, which is home to about 3.5 million voters, or nearly 10 percent of the country’s voters, a regional election official said.