The summer of 1958 was a turbulent one for the Arab world. The political victory of Gamal Abdel Nasser in the Suez crisis two years earlier had fanned the flames of pan-Arab nationalism, which then swept the region's political elite. At the beginning of 1958, Nasser's Egypt and Syria united into one country, the United Arab Republic, an event that rolled through the region like a sandstorm.
In Lebanon, in Yemen and in Iraq, political elites began plotting, sensing a turning point. Clashes broke out in Lebanon between Muslims, who looked to Nasser's leadership, and Christians, who still looked to the West.
The United States, then gradually increasing its presence in the region after Suez and the departure of Britain and France, saw Nasser as a threat, both because of his expansionist ambitions and his support from the Soviet Union. Having "lost" Syria, the US was determined not to lose Lebanon.
As spring turned to summer, violence between Muslims and Christians escalated. The clashes were ostensibly in the service of a political idea, of joining the United Arab Republic - Muslims in favour, Christians against - but also had local political roots in a dispute over parliamentary elections the previous year. The US began to believe that Syria would attack Lebanon, seeking to defend Muslim Lebanese but also seeking unification. The clashes escalated, suggesting a descent into civil war. The Lebanese army refused to intervene.
What forced the US hand was an event on the other side of the Levant. On Monday, July 14 the Iraqi monarchy was overthrown - by an army battalion on its way to defend Jordan's king against any threat from the Lebanon crisis.†The last Hashemite king, Faisal II, was killed. The next day, US troops landed in Beirut.
Fifty-five years on, another July crisis has engulfed an Arab country, leading to clashes between polarised groups and provoking a military intervention. Then, as now in Egypt, the positions of the two groups seemed impossible to reconcile. Now, as then, what happens in one country will have an effect in others: Islamists in other postrevolutionary countries like Tunisia, Yemen and Libya are watching to see what the Muslim Brotherhood does. And now, as then, there are political tectonic plates moving that will define politics for a generation. In Lebanon, in 1958, the clashes between Muslims and Christians prefigured the polarisation that would, in 1975, begin 15 years of civil war.
What, then, can Egypt today learn from the past?
The first thing is that while the military can stabilise a tense situation, the only long-term solution is political. In Lebanon, US Marines went in to calm the situation and make sure the president, Camille Chamoun, was not overthrown - but the resolution of the conflict only came when a political agreement was made that involved Chamoun stepping down.
The second is that the military's position is extremely time-sensitive. From the moment US Marines landed on Beirut's beaches, a countdown of sorts had begun. If the political transition took too long, disaffection could have set in and the military would have found itself the target. Within four months, US troops had left Lebanon.
In Egypt today, the army is in the unusual position of not merely stabilising the situation but actually leading a political transition. How it fulfils that task will affect its credibility and its long-term role in the country. The millions who protested on Egypt's streets for the military to intervene want a swift transition, not extended military rule.
The window of time the army has is also brief because events on the ground can change perceptions and realities. Take the attack outside the Republican Guard's headquarters in Cairo that left 34 people dead, at least some of them at the hands of the army. In response, the Salafist Al Nour party has withdrawn from negotiations. The longer the army is in charge, the more likely it is that something will happen to derail the transition, or entrench the polarisation.
But the most important lesson of all came from how Lebanon sought to rebuild its society. When the crisis of 1958 was over and Lebanon had a new president, the consensus-minded Fuad Chehab, one of the country's elder statesmen, Saeb Salam, a man who had twice been prime minister and would be prime minister twice more, declared that the civil war had ended with "la ghalib, la maghlub" (no victor and no vanquished). It was a slogan and a political idea that Lebanon would reach back to several more times before the century was out.
It is precisely that sentiment that the army needs to adhere to during Egypt's transition.
Egypt will never be stable unless a majority of those who supported the Muslim Brotherhood in office feel that they, too, have a stake in the country's future. Both the army and the opposition, now buoyed by victory, still need to convince the other millions, the pro-Morsi supporters, that they are governing in the interest of all Egyptians and not merely against the Brotherhood.
As the army negotiates a tricky transition, it must avoid any suggestion that the Brotherhood have been vanquished and that they are the only victors. Otherwise, the second Egyptian revolution in as many years is unlikely to be the last.
On Twitter: @FaisalAlYafai