Western allies warned Egypt's military leaders right up to the last minute against using force to crush protest sit-ins by supporters of the ousted Islamist president Mohammed Morsi, arguing they could ill afford the political and economic damage.
A violent end to a six-week standoff between Morsi's Muslim Brotherhood and the armed forces that toppled Egypt's first freely elected president seemed likely once the new authorities declared last week that foreign mediation had failed.
But the United States and the European Union continued to send coordinated messages to army commander General Abdel Fattah el-Sissi and Interim Vice President Mohamed ElBaradei during the four-day Eid al-Fitr Muslim holiday that ended on Sunday, pleading for a negotiated settlement, Western diplomats said.
"We had a political plan that was on the table, that had been accepted by the other side (the Muslim Brotherhood)," said EU envoy Bernardino Leon, who co-led the mediation effort with U.S. Deputy Secretary of State William Burns.
"They could have taken this option. So all that has happened today was unnecessary," Leon told Reuters in a telephone interview. The last plea was conveyed to the Egyptian authorities on Tuesday, hours before the crackdown was unleashed.
U.S. Secretary of State John Kerry was unusually forthright in condemning the imposition of a state of emergency - a throwback to the nearly 30 years of authoritarian rule under U.S. ally Hosni Mubarak, toppled by a popular uprising in 2011.
"In the past week, at every occasion ... we and others have urged the government to respect the rights of free assembly and of free expression, and we have also urged all parties to resolve this impasse peacefully and underscored that demonstrators should avoid violence and incitement," Kerry said.
Some of the toughest U.S. messages were delivered personally to al-Sissi in almost daily telephone calls by Defence Secretary Chuck Hagel, diplomats said.
Signal of displeasure
The United States took the rare step of signalling its displeasure to a strategic Middle East ally, which has a peace treaty with Israel, by halting delivery of four F-16 aircraft under its military aid programme last month.
Washington also enlisted key Arab ally and aid donor Saudi Arabia to tell el-Sissi he needed to find a peaceful, inclusive solution "to retain international financial and political support," a person involved in the diplomatic exchanges said.
Flanked by the foreign ministers of Qatar, a major financier of Morsi's government, and the United Arab Emirates, a supporter of the military takeover, U.S. and EU negotiators sought to coax both sides into a series of mutual confidence-building measures. They would have begun with prisoner releases and led to an honorable exit for Morsi, an amended constitution and fresh elections next year.
An Egyptian military source said the army did not believe the Brotherhood would eventually agree to a deal and felt they were only bluffing to gain time. "They tell the mediators one thing and tell their supporters another," he said.
The diplomatic source said Western mediators tried to persuade el-Sissi that Egypt would suffer lasting political polarisation and economic hardship if there was a bloodbath.
Al-Sissi and the hardline interior minister, Mohammed Ibrahim, were explicitly warned that ElBaradei would resign if they chose force over negotiation, robbing the military of its principal source of liberal, civilian respectability, the source said.
The day after the Egyptian army's crackdown
ElBaradei announced his resignation after Wednesday's assault, saying he believed a peaceful path could still have been found and the government's crackdown helped extremists.
"The hardliners have a remarkable ability to ignore reality," the source said, speaking on condition of anonymity because of the sensitivity of the diplomatic exchanges.
The Egyptian military source said public outrage after critical comments by visiting U.S. senators John McCain and Lindsey Graham last week and leaked reports of a possible deal between the authorities and the Brotherhood had put the army in a tough position.
The mediators warned that any move to break up the sit-ins would likely cause hundreds of deaths and drive many conservative Salafi Muslim activists, initially supportive of Morsi's overthrow, to join forces with the Brotherhood in fierce opposition to the authorities.
The economic message was just as stark. The Western source said Egypt had been warned that it could not afford to go on spending foreign currency at a rate of $1.5 billion a month until its reserves were exhausted.
With tourism and investment decimated by political turmoil since the overthrow of Mubarak in 2011, foreign reserves had shrunk by more than half to less than three months' import cover by the time Morsi was ousted on July 3.
Saudi Arabia, the UAE and Kuwait, relieved to see the back of the Brotherhood, seen as a threat to their own monarchies, immediately promised $12 billion in aid to the new authorities, to help overcome imminent fuel and wheat shortages.
At its current burn rate, that money will keep Egypt going for less than a year.
The source said wiser heads in the government realised Cairo needed broader international support, including cooperation with the International Monetary Fund, to revive the economy, but such arguments cut little ice with the security establishment.
Want to enjoy 'Zen' reading - with no ads and just the article? Subscribe todaySubscribe now