Taking the lead position in mediating the most recent conflict is a welcome reassertion of the historic role of Egypt, the Arab world's most populous country.
Cairo faces a choice: lead on Gaza, or simply follow Hamas
The news that Egypt has invited an Israeli envoy to Cairo for ceasefire talks over Gaza encapsulates just how far Egypt has emerged, in a matter of months, as a country with real diplomatic heft.
Taking the lead position in mediating the most recent conflict is a welcome reassertion of the historic role of the Arab world's most populous country. Even if mediation fails, the fact that the Egyptians have made such swift diplomatic headway points to a new focus in the Israeli-Palestinian conflict.
And yet Cairo's mediation strategy is fraught with danger. Getting closely involved in internal Palestinian politics, at a time of such transition within Egypt, could pull Egyptian-Palestinian policy in one of two directions.
The first would see Cairo as a reinvigorated regional power broker. An oft-quoted dictum attributed to Henry Kissinger remains relevant: there could be no war in the Middle East without Egypt.
The criticism most often levied at Anwar Sadat for signing the Camp David Accords was that it removed Egypt from the so-called "resistance front" against Israel's occupation of Palestinian land. When Egypt split from the rest of the region, the pressure on Israel to negotiate with the Palestinians decreased. That may not have been Sadat's intent, but in the three decades since the 1979 peace treaty, Israeli settlements have increased and a genuine peace - not merely the periodic so-called "calm" - seems further away than ever.
While peace overtures from Arab countries did not persuade Israel to end its occupation, Sadat's successor Hosni Mubarak was often outright complicit in perpetuating it. The crossing at Rafah - Gaza's only lifeline that is not controlled by Israel - has often been closed.
Even after the crippling siege of Gaza began in 2006, Egyptian officials often spuriously argued that an easing of restrictions at Rafah would amount to de facto recognition of the split between Palestinians in Gaza and the West Bank. Thus was the fig leaf of Palestinian unity used to cover Cairo's complicity.
Since the middle of last week, the crossing has been open, allowing, for example, a convoy of hundreds of Egyptian activists to cross, taking much-needed food and medicine to Gaza, as well as Egyptian politicians, who now have to answer to their outraged constituents.
In the years since Camp David, Egypt has changed, but the Middle East has changed too. The challenges that now face the region - from the civil war in Syria to the rise of Iranian influence - cannot easily be resolved from the outside. Arab leadership is required, and Egypt is best placed to provide it.
As a moderate arbiter, an ally to Turkey and a counterweight to Iran, Egypt could do much to restore a semblance of diplomatic balance. This appears to be the path that Egypt's President Mohammed Morsi envisaged when he went to Tehran and declared his support for Syria's uprising. After the revolution and democratic elections, Egypt can speak and negotiate not merely because it is the largest Arab country by population, but because it wields considerable moral authority as well.
That would be the best-case scenario, but it is not the only possibility. Egypt's politicians have a more narrow political option that holds considerable appeal - but would be ultimately self-destructive.
In the second scenario, Egypt's leaders - not necessarily Mr Morsi, but the cadre of Islamist politicians around him - might closely align the Muslim Brotherhood in Egypt with Hamas in Gaza. Hamas has come a long way since it was founded in 1987 explicitly as the Palestinian arm of the Brotherhood - it is now a movement in its own right, with its own goals and challenges - yet there remains considerable similarity in ideology.
Given Gaza's border with Egypt, and Hamas's considerable influence (even in the West Bank), it would be natural for Egyptian politicians to believe that backing Hamas would give them significant leverage over the movement and in Palestinian politics.
Yet it would be a dangerous strategy in ways that are not immediately obvious.
The destabilising effect of outside powers picking factions within a country can be seen most clearly in Lebanon, where support - from the Iranians backing Hizbollah to the United States and Saudi Arabia support for its opponents - has created a fragmented political landscape that prevents political compromise.
Such a strategy would also tie the narrow, specific objectives of Hamas to the broader politics of Egypt. Hamas is a movement, with its own political and military objectives, subjected to a siege by a foreign power, without access to the regular resources of a state. Egypt is different in almost every way, and for Cairo to tie its regional objectives too closely to Hamas would be incredibly dangerous.
Not only would Israel and the United States - which both have their own interests and agreements with Egypt - hold Cairo responsible for Hamas's actions (which is already happening), it would also draw Egypt further into the murky territory of occupation politics.
Egypt has an opportunity to rise above the fray of regional fighting and make a good-faith attempt to broker peace in the region. There is enormous political capital to be gained by not allying with any specific Palestinian political faction, but instead with the long-term interests of the people. The history of the Middle East shows how often that rule has been broken with catastrophic results.
On Twitter: @FaisalAlYafai