Russian troops are withdrawing from around Ukraine’s second-largest city after weeks of heavy bombardment, the Ukrainian military said as the two sides engaged in a grinding battle for the country’s east.

Ukraine’s general staff said the Russians were pulling back from around the north-eastern city of Kharkiv and focusing on guarding supply routes, while launching mortar, artillery and air strikes in the eastern Donetsk region to “deplete Ukrainian forces and destroy fortifications”.

Defence minister Oleksii Reznikov said Ukraine is “entering a new – long-term – phase of the war”.

Russia Ukraine War
Russian army sergeant Vadim Shishimarin during a court hearing in Kyiv (Efrem Lukatsky/AP)

As the country’s top prosecutor put a Russian soldier on trial for war crimes, the first of dozens that could face charges, President Volodymyr Zelensky said Ukrainians were doing their “maximum” to drive out the invaders and that the outcome of the war would depend on support from Europe and other allies.

“No one today can predict how long this war will last,” he said in his nightly video address on Friday.

Russia’s offensive in Donbas, Ukraine’s eastern industrial heartland, appeared to be turning into a village-by-village, back-and-forth slog with no major breakthroughs on either side.

After failing to capture Kyiv, Ukraine’s capital, the Russian military decided to concentrate on the Donbas, but its troops have struggled to gain ground.

Mr Zelensky said Ukraine’s forces had made progress, retaking six Ukrainian towns or villages in the past day. Western officials said Ukraine had driven Russian forces back around Kharkiv, which was a key target for Moscow’s troops.

Russia Ukraine War
Ukrainian President Volodymyr Zelensky (Ukrainian Presidential Press Office/AP)

“The Russians really haven’t made much in the way of tactical gains recently,” one western official said, describing the war’s front line as “oscillating”.

“The Ukrainians continue to launch counterattacks, particularly around Kherson and Kharkiv. We expect this to settle into a long attritional battle,” the official added.

The Ukrainian military chief for the Luhansk region of Donbas said on Friday that troops had nearly full control of Rubizhne, a city with a pre-war population of around 55,000.

Fighting was fierce on the Siversky Donets River near the city of Severodonetsk, where Ukraine has launched counterattacks but failed to halt Russia’s advance, said Oleh Zhdanov, an independent Ukrainian military analyst.

“The fate of a large portion of the Ukrainian army is being decided — there are about 40,000 Ukrainian soldiers,” he said.

Russia Ukraine War
Destroyed Russian armoured vehicles on the banks of Siverskyi Donets River (Ukrainian Presidential Press Office/AP)

However, Russian forces suffered heavy losses in a Ukrainian attack that destroyed a pontoon bridge they were using to try to cross the river in Bilohorivka, Ukrainian and British officials said, in another sign of Moscow’s struggle to salvage a war gone awry.

Ukraine’s airborne command released photos and video of what it said was a damaged Russian pontoon bridge over the Siversky Donets River and at least 73 destroyed or damaged Russian military vehicles nearby.

The UK Ministry of Defence said Russia lost “significant armoured manoeuvre elements” of at least one battalion tactical group in the attack. A Russian battalion tactical group consists of about 1,000 troops.

It said the risky river crossing was a sign of “the pressure the Russian commanders are under to make progress in their operations in eastern Ukraine”.

Ukraine Russia Mariupol
Damage in Mariupol (AP)

In the ruined southern port of Mariupol, Ukrainian fighters holed up in a steel plant faced continued Russian attacks on the last stronghold of resistance in the city. Sviatoslav Palamar, deputy commander of Ukraine’s Azov Regiment, said his troops will hold out “as long as they can” despite shortages of ammunition, food, water and medicine.

Ukraine’s deputy prime minister, Iryna Vereshchuk, told the country’s Suspilne news outlet that Ukrainian authorities are negotiating the evacuation of 60 severely wounded troops from the steelworks.

She said Russia had not agreed to the evacuation of all wounded fighters at the plant, who number in the hundreds.

An aide to Mariupol’s mayor said between 150,000 and 170,000 civilians remain in the city, which had a pre-war population of more than 400,000. Petro Andryushchenko said the residents were “hostages” of the occupying Russian forces, “with almost no chance to escape to Ukraine”.

In other developments, a move by Finland and potentially Sweden to join Nato was thrown into question when Turkish President Recep Tayyip Erdogan said his country is “not of a favourable opinion” towards the idea.

POLITICS Ukraine
(PA Graphics)

He accused Sweden and other Scandinavian countries of supporting Kurdish militants and others Turkey considers terrorists.

Russian President Vladimir Putin launched the war aiming to thwart Nato’s eastward advance. The invasion of Ukraine has other countries along Russia’s flank worried they could be next.

Mr Zelensky said in his video address that Ukrainians were doing everything they could to drive out the Russians, but “no one today can predict how long this war will last”.

“This will depend, unfortunately, not only on our people, who are already giving their maximum,” he said. “This will depend on our partners, on European countries, on the entire free world.”