Russia's politically-sensitive and ultimately fruitless decision to launch bombing missions on Syria from Iranian soil has exposed the limits to its air power, leaving Moscow in need of a new strategy to advance its aims.
People familiar with Russia's military said Moscow opted for the sorties from Iran - and Tehran agreed to allow them - because they were struggling to achieve their aim of crushing rebels in the city of Aleppo.
The gamble failed and rebels fighting their ally, Syrian President Bashar al-Aasad, remain ensconced in parts of Aleppo.
Russia began air strikes on Syria in support of Assad on Sept. 30 last year, launched from bases in government-held territory and from warships. Then this month, facing logistical problems in mounting an expensive campaign at a time of tight state finances, it intensified the bombing of Aleppo in what turned out to be a brief series of raids from Iran.
The strikes on the Aleppo rebels seem to have achieved little beyond stirring a political row in Iran, whose constitution forbids the establishment of any kind of foreign military base.
The fact that Russia went to such lengths to achieve its aims in Aleppo and still failed could strengthen the hand of those in Moscow who believe the operation in Syria has reached a watershed, and that it is time to seek a negotiated solution.
"I get the feeling we're like a horse at the circus, running around in a circle since Sept. 30 when we first deployed our aircraft there," said a person close to the Russian defense ministry who spoke on condition of anonymity.
"Our forces are insufficient, our coordination with the Iranians is not at the required level. We need to change something. What, I don't know."
Russia's defense ministry announced on Aug. 16 that it had for the first time used an air base in Iran from which to launch air attacks on Syria.
On subsequent days, long-range Russian Tupolev 22M3 bombers, escorted by Sukhoi fighters, took off on sorties from the Nojeh air base, near the Iranian city of Hamadan.
Letting Russia base aircraft there was politically sensitive for Iran: the last time a foreign power had used an Iranian air base was in World War Two.
Some Iranian lawmakers called it a breach of the constitution while Defence Minister Hossein Dehghan said that, by publicly revealing the arrangement, Moscow had committed a "betrayal of trust".
By Aug. 22, Iran's foreign ministry announced that Russia's use of the base had ended. In Moscow, the defense ministry said aircraft operating from the bases had completed their tasks.
A spokesmen for Russia's defense ministry and spokeswoman for the foreign ministry did not respond to Reuters questions about its objectives in Aleppo and its use of the Iranian base.
But Andrei Klimov, a pro-Kremlin member of the foreign affairs committee in the upper house of Russia's parliament, said the cost of the Syrian operation may have been a factor.
"We are trying to conduct the operation in Syria within certain sums," he told Reuters. "The defense ministry has other expenditures. Therefore to optimize costs, more economical routes are sought. Any sensible country does the same thing."
Russia's desire to use the base was "linked to the increase in intensity of military activity in the Aleppo area", said Vasily Kashin, an analyst with the Center for Analysis and Technologies in Moscow, which advises Russia's defense sector.
"It seemed that, in the opinion of the Syrian, Russian and Iranian commands, a watershed moment is coming."
That chimed in with other evidence that Russia and its allies were ramping up their efforts to take control of Aleppo over the last two months. The leader of Lebanon's Hezbollah, which is allied to Iran, said on June 24 that the movement would send more fighters to the Aleppo area. The battle for the city was of strategic importance, he said.
Since then, residents and opposition activists have reported an increase in the intensity of raids on Aleppo, including the high-altitude operations which distinguish Russian bombing from that by low-flying Syrian aircraft.
That was matched on the ground by an offensive from Syrian government forces which left rebel-held areas besieged. Aid organizations reported a jump in civilian casualties and warned of a humanitarian disaster because of a shortage of supplies.
The Iranian base was a crucial logistical cog in this escalation in Aleppo because without it, Russia's Tupolev jets have to fly the greater distance to Syria from Russia, and back.
That means carrying more fuel, which reduces the bomb payload they can carry, and also - because of the longer flight time - cuts into the number of sorties they can fly.
Air bases inside government-controlled parts of Syria were not suitable for the Tupolev aircraft, and adapting them would be expensive, according to Kashin.
The person close to the defense ministry said of the logistical challenges facing Russia's air operation: "We don't have all that many planes."
During the intensified bombing, the rebel forces in Aleppo even counter-attacked in the middle of this month, breaking the siege and restoring access to supply routes.
According to defense experts, Russia does have the military capacity to intensify its bombing in Syria further, whether or not it has access to the Iranian base.
But that would mean more expense for Russia, which is struggling to fill gaps in its budget, faces a parliamentary election next month, and has seen the Syrian operation drag on far past the Kremlin's original timetable.
In May, President Vladimir Putin announced that "the main part" of Russian armed forces in Syria would start to withdraw, saying that their work had "on the whole, been fulfilled". But still the bombing went on.
The difficulty of making progress militarily will make a negotiated solution more attractive to the Kremlin.
Russia agreed on Thursday to a 48-hour humanitarian ceasefire in Aleppo to allow aid deliveries to get through, U.N. officials said. Foreign Minister Sergei Lavrov and U.S. Secretary of State John Kerry met in Geneva on Friday to talk about a possible truce in Syria.
Huge differences though remain between Moscow and its allies on one hand, and the United States and its allies on the other, not least over the future of Assad. Previous openings for peace talks have dissolved into renewed fighting.