A member of the pro-Ukraine Donbass Battalion checks an automaric rifle seized from pro-Russians, while patroling the outskirts of the eastern Ukrainian city of Lysychansk on July 26, 2014
Kiev (AFP) - When Ukraine's military offensive to oust pro-Russian rebels from the restive east began in mid-April with humiliated soldiers meekly surrendering their armoured vehicles it looked doomed to failure.
But after more than three months of brutal fighting that has claimed some 1,100 lives, a sudden advance by battle-hardened government forces in recent weeks has seen them snatch back a string of key towns and left the once confident insurgents scrambling.
Analysts say the dramatic turnaround is down to a combination of growing professionalism and ruthlessness from Kiev's forces on the one hand and the shifting nature of the support that Russia is giving the rebels.
"The Ukrainian army is finding out how to fight as it goes along and has shown how capable it is of learning," said Valentyn Badrak, director of the Research Centre for the Army, Demilitarisation and Disarmament in Kiev.
Poorly coordinated, riddled by corruption and low on morale after the humbling loss of Crimea to Russia in March, Ukraine's military has undergone a radical shakeup after drafting highly motivated volunteers and improving its leadership.
"The Ukrainian army understood that this a real war and that the survival of the country is in the balance," said Konstantin Kalachev the head of the Moscow-based Political Expert Group.
"Lessons were learnt from the defeats, personnel was changed and morale was bolstered."
That has been aided in no small part by greater political direction in Kiev since the election of billionaire tycoon Petro Poroshenko as president in May filled the vacuum left by the ouster of Kremlin-back leader Viktor Yanukovych in February, Kalachev said.
On the ground, despite denials from Kiev, Ukraine's forces also seem to have ditched an earlier reluctance to fight in built-up areas with the United Nations and rights groups accusing them of increasingly using heavy weapons against populated areas, adding to the spiralling civilian casualties.
- Russian support -
But major questions exist over the extent of Russian support for the separatists and what the Kremlin will do if its alleged proxies seriously look like they are losing.
As they retreated from key towns rebel commanders have increasingly lashed out at Moscow for not sending enough support and some analysts said Russian President Vladimir Putin might be looking for a way out in the wake of tougher international sanctions and the downing of Malaysia Airlines flight MH17.
But far from backing down, the US says Moscow is now "doubling down" on its support for the rebels, ramping up the flow of weapons and firing directly at Ukrainian troops from its territory.
"The key question now is when will Russia say 'stop' and how it will react to gains made by Ukrainian armed forces in recent days," said Konrad Muzyka, Europe and CIS Armed Forces analyst at IHS Jane's in London. "Make no mistake, Russia will respond."
With international ire on MH17 giving Ukrainian forces a "carte blanche" to deal with the separatists Muzyka said Kiev's next step will be to try to cut off supply lines to the main rebel stronghold of Donetsk before looking to tighten control along the frontier with Russia.
"In the long term, the success of the offensive will depend on sealing the border," he said.
But despite the recent advances by a newly emboldened Kiev, other analysts warned that the conflict in eastern Ukraine was a "partisan" insurgency, meaning it would be hard for Kiev to score an outright victory.
"It is not right to overestimate the successes of the Ukrainian army," said independent Russian military analyst Alexander Golts.
"Ukraine has got involved in a war which is impossible to win."