The Russian-backed separatists who control the eastern Ukrainian cities of Donetsk and Lugansk have been fighting and losing on two fronts for the past week.
In the battle for public opinion, they've struggled to convince the world they had nothing to do with the shooting down of Malaysian Airlines Flight MH17, their credibility ebbing even further as they badly mismanaged the crash site and the handling of the bodies of the 298 people killed in the atrocity.
In the second and more tangible war, the seemingly demoralized rebels have been rapidly ceding ground to an invigorated Ukrainian army. This week the separatist fighters deserted their positions around the city of Donetsk, their de facto capital, withdrawing to the city's centre in an apparent attempt to lure the advancing national army into a street-by-street battle.
These could be the last days of the rebel Donetsk People's Republic. And, if so, they're likely to be bloody and drawn out – featuring the sort of urban warfare Europe hasn't seen since the crumbling of Yugoslavia two decades ago.
Russia's Itar-Tass news service quoted the military leader of the separatists, Igor Strelkov, on Thursday saying the rebels had suffered 50 casualties – "mostly wounded fighters" – and had lost two tanks, two fighting infantry vehicles and one armoured personnel carrier in clashes with the Ukrainian army in and around Donetsk. It was not clear what time frame the losses occurred in and, although Mr. Strelkov claimed government losses were "several times greater," there was no question that it was his forces that were on the defensive.
It's a reversal of the situation of two months ago, when it seemed the rebels were capturing new cities and towns almost every day. At one point, the Donetsk People's Republic and the affiliated Lugansk People's Republic controlled a swathe of territory stretching from the port of Mariupol, on the Sea of Azov, to their fortified military headquarters of Slavyansk, more than 200 kilometres to the north, and another 200 kilometres east to the Russian border.
As battle-hardened mercenaries from Russia's wars in Chechnya poured in to support the rebels – and the rebels gained Soviet-era tanks and antiaircraft batteries – it seemed the poorly equipped and under-trained Ukrainian army could do nothing to stop the separatists from carving out their mini-state.
More than 1,000 combatants and civilians have been killed since fighting began in the Donetsk and Lugansk regions in April. The two Russian-speaking oblasts, or provinces, declared independence from Kiev following controversial referenda in May. Both regions seek eventual union with Russia.
That has always seemed a distant goal, and it has been getting more remote. The rebels fled Slavyansk in early July and since then the Ukrainian army has been taking the fight to them – using air strikes and artillery that the rebels don't have (and which the Ukrainians had previously been reticent to use). Now the rebels are in full retreat and looking across the border for more help from Russia that likely isn't coming on the scale the separatists need.
"Before last week's events, I would rather suggest that support [for the rebels] would intensify to avoid military collapse," said Fyodor Lukyanov, editor of Russia in Global Affairs, a Moscow-based foreign policy journal. "Now it's more difficult."
The rebels appear to have lost focus and morale since MH17 crashed in their territory, bringing the Donetsk People's Republic under intense worldwide scrutiny. At the same time, the Ukrainian army – which stood aside and did little as Russian troops flooded and annexed the Crimean Peninsula earlier this year – has emerged as a credible fighting force, rapidly gaining in training and experience it previously lacked.
In an interview with the BBC – during which he repeated the claim that his forces didn't have the capability to shoot down an airliner flying at an altitude of 10 kilometres – rebel "prime minister" Aleksandr Borodai admitted that his fighters were in a "forced retreat" on the battlefield.
"We admit it honestly, the size of our force does not compare to the mobilized forces of the Ukrainian army, whose ranks are swelled by huge numbers of mercenaries from many different countries," he said. Sounding somewhat bitter, Mr. Borodai said "the Russian people" were supporting the separatists, but he claimed to be getting little help from the Russian state.
That doesn't mean Moscow has ended its support of the Donetsk People's Republic. Russian President Vladimir Putin has showed no signs of giving in to the key Western demand of shutting his country's border with Ukraine to cut off the flow of fighters and weapons. Analysts say Mr. Putin would see his popularity sag at home if he suddenly abandoned his key foreign policy principle of standing up for Russian-speakers abroad.
On Wednesday, two Ukrainian fighter jets were shot down, with Kiev claiming they had been hit by missiles fired from Russia (Moscow denied involvement, and the rebels said they shot down at least one fighter). There have also been increasing exchanges of fire across the Russia-Ukraine border, and new reports of a buildup of Russian troops in the region.
The United States said Thursday it had evidence Russia was firing artillery across the border – directly targeting Ukrainian military positions – and was moving to deliver "heavier and more powerful multiple rocket launchers" to the separatists.
But unless Moscow chooses to wade in even more directly, and with the Ukrainian army on the verge of routing the rebels as a military force, Mr. Lukyanov said the next stage of the battle for eastern Ukraine may be a guerrilla war, rather than a continuation of a head-on military confrontation the separatists don't look able to win. "As long as there's a chance to prolong the fight – no one can confirm how much Russia helps [the separatists], but of course there's some help – Russia will continue. There will be an insurgency in some form."
The Ukrainian army's gains have come despite international calls for a ceasefire in the region to allow for a proper investigation into the fate of MH17. Both Mr. Putin and Ukrainian President Petro Poroshenko have called for a halt in the fighting, but there has been little sign of it on the ground.
A Donetsk resident told The Globe and Mail that he could hear artillery rounds and rockets landing in the city throughout Wednesday night and all day Thursday. Earlier this week, shells struck near Donetsk's train station, killing at least five people. Thousands of residents have already fled the city.
Lugansk has also seen heavy fighting. Dozens of people were reportedly killed there in the last week amid seemingly indiscriminate shelling that the Ukrainian army and rebel forces each blame the other side for.
The advances have come at a heavy cost to the Ukrainian military. A government spokesman said eight soldiers were killed and 50 were injured in one 24-hour period last weekend. On Wednesday, Mr. Poroshenko signed a decree ordering partial mobilization of the country's reserve forces.
Moscow and Kiev remain at odds about how to end the crisis. The Kremlin wants to see a redrawn Ukrainian constitution that weakens the central government, puts the Russian language on an equal basis with Ukrainian, and guarantees Ukraine will be a neutral country, unable to join blocs like NATO or the European Union. Mr. Poroshenko has hinted he'd accept some of those changes but has refused to meet directly with the leaders of the Donetsk People's Republic, whom he calls "terrorists."
No one sees a quick end in sight to Ukraine's troubles. But for the first time since March, when Russia swept in an annexed Crimea from a staggering Ukrainian government, Kiev has the upper hand.