(CNN) -- President Abdel Fattah el-Sisi of Egypt is on a mission -- to return his country to its rightful place as the "indispensable" Arab state after what he saw as the dangerous chaos of Muslim Brotherhood rule under his predecessor, Mohamed Morsy.
He also is determined to resist the spread of Islamist militancy, now entrenched in Sinai and spilling into Egypt from Libya. Since leading the ouster of Morsy a year ago, el-Sisi has hounded the Muslim Brotherhood underground; hundreds of its members have been arrested and many sentenced to death. Morsy himself languishes in jail and is on trial for inciting murder and other offenses.
El-Sisi is not the first Egyptian leader to fear Islamist militancy. In fact all but Morsy have suppressed it and one -- Anwar Sadat -- ultimately was its victim. And not coincidentally all but Morsy-- stretching back to Gamal Abdel Nasser -- were military men before becoming President.
These two imperatives -- a sense of Egypt's historic role and the traditional animosity of the Egyptian military toward Islamist radicalism -- have propelled Egypt to take a central role in the on-off cease-fire talks to end the latest Gaza conflict.
It helps that Egypt's intelligence service has deep experience of dealing with the Palestinian factions and Israel.
Egypt's central role also is dictated by geography. It is the only Arab state to share a border with Gaza. If that border is to be reopened, Egypt will have to agree to any international monitoring mission to prevent banned goods -- the sort that would allow Hamas to re-arm -- from entering Gaza.
But el-Sisi's government does not see itself as an "honest broker" between Israel and Hamas. El-Sisi shares the Israelis' loathing of Hamas, which itself sprang from the Muslim Brotherhood back in 1987 and which was recently labeled a terrorist organization by an Egyptian court.
Egypt and Israel vs. Hamas
The Egyptian government is not directly negotiating with Hamas, but with a Palestinian delegation of which Hamas and Islamic Jihad are a small part. Any concessions won by the Palestinians will be claimed by the Palestinian Authority as much as Hamas.
While Morsy embraced Hamas and warned Israel that it would "pay a heavy price if it continues its aggression," Egypt and Israel are now in lockstep against a shared adversary.
The last thing el-Sisi wants is any sort of Hamas victory, imagined or otherwise, that would appeal to the Arab street. One Israeli minister described the close cooperation with Cairo as "an odd but very welcome moment" after the hostility of the Morsy government.
Perhaps that is why the first Egyptian cease-fire proposal was so readily accepted by Israel.
In the words of one diplomat in the region, "The Israelis knew Hamas would reject it, so they could accept it and look good, knowing that in a few hours they'd be able to resume the demilitarization of Gaza."
El-Sisi wants to see Gaza demilitarized as much as Israel does, not just because of Hamas but because of other actors there such as Islamic Jihad.
Egypt faces a host of its own security problems that would only be aggravated by a strong militant presence in Gaza. Jihadist cells -- which Cairo claims have been aided by Hamas -- are now entrenched in the Sinai, a vast area that borders Gaza and whose lawlessness has challenged successive Egyptian governments.
Islamist militant groups are also sprouting up along the western border with Libya. Last month, more than 20 Egyptian soldiers were killed when gunmen crossed the desert border and attacked a checkpoint at Wadi el-Gedid.
El-Sisi responded by promising that "terrorism will be uprooted from every part of Egypt."
But the attacks have continued. A gun battle Tuesday between security forces and suspected militants in the region of Matruh on the Mediterranean left nine dead, according to the Egyptian Interior Ministry. El-Sisi blames the Muslim Brotherhood for opening Egypt to an influx of jihadists.
Despite its obvious motivations, Egyptian mediation is not without risk.
Goal of independent Palestine ingrained
The government's control of local media may have muffled sympathetic coverage of Gaza's plight and Hamas' resistance to Israel. One talk-show host, Mazhar Shahin, declared the Egyptian people were "not ready to sacrifice even a single hair from the eyebrow" in defense of Hamas.
But Egyptians see the pan-Arab news channels, they see the destruction and suffering in Gaza, and even if there are no polls to prove it, they likely expect their government to lead the way in relieving it.
For decades, pursuing the goal of an independent Palestine has been ingrained in Egypt's foreign policy.
El-Sisi himself subscribes to that goal -- but with little urgency. He said last Saturday: "We have a real opportunity to end this conflict for once and for all but we must give the Palestinian people real hope in a Palestinian state and its capital Eastern Jerusalem." Then he added as a caveat: "It might sound too early to talk about this but it must be our final goal."
Even so, Egypt cannot assume that the Palestinian Authority (PA) will be pliable negotiators.
PA President Mahmoud Abbas is all too aware of the support in the West Bank for Hamas, whose flags have been hoisted by the hundreds at recent protests.
The longer the conflict went on, the more the PA tilted toward Hamas' demands -- and especially its insistence on the immediate lifting of the blockade of Gaza as the price for a permanent cease-fire.
The only game in town
Egyptian diplomacy will be tested to the full in reconciling Israel's insistence on the demilitarization of Gaza as the first step and the Palestinians' demand that borders -- land and maritime -- be reopened immediately and demilitarization form part of later negotiations.
But ultimately Hamas knows -- as do the other Palestinian factions -- that Egypt's is the only game in town.
Hamas won't negotiate with the Israelis directly (the feeling is mutual). Nor will the Israelis have anything to do with Hamas' chief backers -- Qatar and Turkey.
Israel wants el-Sisi to succeed. He's the sort of Egyptian leader with whom it can do business. And he's now a critical figure in an alliance that includes the Gulf monarchies (Qatar excepted) and the United States in seeking to stem the tide of Islamist militancy.
But Israeli officials -- and many other observers -- believe there is another reason that el-Sisi aims to make himself the "indispensable" partner: to use that role to win much-needed international aid and credit for an economy on life-support.
El-Sisi inherited a mess, with fuel subsidies alone costing the state nearly $20 billion a year, tourism collapsing and foreign exchange reserves dwindling. In overthrowing the Muslim Brotherhood, he quickly won financial backing from Saudi Arabia and Kuwait, worth $12 billion according to some estimates.
IMF in the future?
If the el-Sisi government can introduce much-needed reforms to cut bureaucracy and begin to reduce subsidies, it may be able to negotiate the $4.8 billion loan from the International Monetary Fund that the Morsy government failed to secure.
But it will need help fast: a sharp reduction in fuel subsidies last month generated scattered street protests. And yet subsidies still eat up one-third of the national budget, while education consumes less than six per cent.
Exactly a year ago, el-Sisi gave an interview to the Washington Post, just after ousting Morsy.
"The pains and suffering of the people are too many. A lot of people don't know about the suffering. I am the most aware of the size of the problems in Egypt," he told the Post's Lally Weymouth.
"That is why I am asking: where is your support? The title of the article should be 'Hey America: Where is your support for Egypt?'"
He may now feel it is more deserved than ever.