The former Soviet republic's 40 million people defied expectations - and the Kremlin's best-laid plans - by repelling a much larger enemy and preventing outright defeat in the days and weeks after Russian tanks and soldiers rolled towards Kyiv.

But as the war enters its third year, international aid and military supplies have slowed, impacting the battlefield where Kyiv's summer counteroffensive floundered and Moscow is grinding out territorial gains.

Ukrainian President Volodymyr Zelenskiy still has plenty of friends. On Saturday he welcomes Western leaders to discuss security guarantees, sanctions against Russia and other pressing issues.

U.S. President Joe Biden remains a staunch ally, although $61 billion in aid is being held up by political bickering in Washington.

Looking to the end of 2024, U.S. elections could bring a change in president and in policy towards Ukraine and its war with Russia, clouding the outlook for the coming years.

During a trip to the United States in November, Zelenskiy invited Republican presidential hopeful Donald Trump - a vocal critic of U.S. support for Kyiv - to Ukraine to see for himself the damage wrought by Russia's war.

Zelenskiy also told U.S. politicians that Russia, led by President Vladimir Putin, may not stop at Ukraine's borders if it emerges victorious.

Putin dismisses such claims as nonsense. He casts the war as a wider struggle with the United States, which the Kremlin elite says aims to cleave Russia apart. The West sees the invasion as an unjustified act of aggression that must be repelled.

OLD WAR AND NEW

As well as hosting foreign dignitaries, Zelenskiy will take part in a call with G7 leaders on Saturday. There will be events across Ukraine including a commemoration service for those who died in Bucha, north of Kyiv - scene of some of the worst alleged war crimes of the conflict.

Ukraine's prosecutor general said on Friday it had launched investigations into more than 122,000 suspected war crimes cases in the last two years. Russia denies carrying them out.

The initial shock of the invasion gradually morphed into familiarity and then fatigue, as the world watched initial Russian gains and a stunning Ukrainian counteroffensive in late 2022 slow into grinding, attritional trench warfare.

In scenes reminiscent of the battlefields of World War One, soldiers under heavy artillery fire are dying in their thousands, sometimes for a few kilometres of land.

Meanwhile, both sides have developed huge and increasingly sophisticated fleets of air, sea and land drones for surveillance and attack, an unprecedented use of unmanned vehicles that could point the way to future conflicts.

Russia, with a much bigger population to replenish the army's ranks and a larger military budget, might favour a drawn-out war, although the costs have been huge for Moscow as it seeks to navigate sanctions and a growing reliance on China.

Ukraine's position is more precarious. Villages, towns and cities have been razed, troops are exhausted, ammunition is running low and Russian missiles and drones rain down almost daily.

Earlier in February, Russia registered its biggest victory in nine months when it captured the eastern town of Avdiivka, ending months of deadly urban combat.

Yet Zelenskiy remained defiant ahead of the anniversary.

"I am convinced that victory awaits us," he told diplomats in Kyiv this week in an emotional address. "In particular, thanks to unity and your support."

Tens of thousands of troops have been killed on both sides and tens of thousands more wounded, while thousands of Ukrainian civilians have perished. Moscow says it only aims at military and strategic targets.

RISING COSTS

The scale of devastation in Ukraine is staggering.

A recent World Bank study said that rebuilding Ukraine's economy could cost nearly $500 billion. Two million housing units have been damaged or destroyed, and nearly 6 million people have fled abroad.

In addition to raising money and arms to continue the war, Zelenskiy is pushing legislation through parliament allowing Ukraine to mobilise up to half a million more troops - a target some economists say could paralyse the economy.

Russia's finances have proved resilient so far to unprecedented sanctions. While natural gas exports have slumped, shipments of oil have held up, thanks largely to Indian and Chinese buying.

Russia's GDP expanded 3.6% in 2023, although some Russia-based economists warned that this was driven by a leap in defence spending and that stagnation or recession loom.

That will not jeopardise Putin's victory in elections in March, which he is set to win by a landslide amid broad support for his performance and for the war, described by the Kremlin as a "special military operation".

In the last two years, authorities have cracked down hard on any form of dissent over the conflict. On Feb. 16, Putin's most formidable domestic opponent, Alexei Navalny, died in an Arctic penal colony where he was serving a 30-year sentence.

On Friday, Putin addressed troops fighting in Ukraine as Russia marked Defender of the Fatherland Day, hailing them as heroes battling for "truth and justice."

He laid a wreath at the tomb of the unknown soldier at the foot of the Kremlin wall to honour those who have died in battle.

(Additional reporting by Andrew Osborn and Mike Collett-White; Writing by Mike Collett-White; Editing by Ros Russell)

By Olena Harmash