A dramatic shift in Middle East alliances: Egypt, Israel and Hamas

Egypt's initial failed effort to mediate an end to the latest confrontation between Israel and Hamas reflects a dramatic shift in Middle Eastern alliances since the last eruption of intense violence between Palestinians and Israelis, the third in nearly six years.

In November, 2012. Egypt was able to leverage its warm ties with Hamas to persuade the militant Palestinian group to accept a cease fire in Gaza, which it has ruled since seizing power in 2007.

This time, Egypt's plan for restoring what the Israelis call "calm for calm" was quickly endorsed by Israel, the United States, and the Arab League. But it was rejected by Hamas, which loudly complained that Egypt had not consulted the group in advance.

Egyptian mediation and Hamas' sharp rejection of the cease fire have been a boon to Israel, buying it valuable time and silencing some critics of its bombing campaign in Gaza in response to Hamas' rocket attacks on Israel's population. "Neither Egypt for Israel wants to see Hamas reap a victory from this round of fighting," said David Schenker, a Middle East expert at the Washington Institute for Near East Policy.

Egyptian officials say they are determined to keep trying to mediate a halt to the latest round of violence. And Egyptian officials continue to consult with senior representatives of the two rival Palestinian factions – Hamas and the Palestine Liberation Organization, which rules the West Bank and sent Palestinian President Mahmoud Abbas, its key leader, to Cairo.

But much has changed in Egypt and the region since Egypt acted as a disinterested broker between Arabs and Israelis.

In the fall of 2012, Egypt's first democratically elected president since the Arab Spring revolution was Mohamed Morsi, a leader of the militant Muslim Brotherhood, which enjoyed warm ties with Hamas. But in July, 2013, the Egyptian military ousted the unpopular Morsi in what Egyptians call a "soft' or a "people's coup." Since then, relations between Cairo and Hamas have soured.

Even before Egyptians overwhelmingly elected retired Field Marshal Abdel Fattah el-Sissi as president in late May, the transition government he effectively led had distanced itself from Hamas and taken steps to stop the smuggling of weapons to Gaza thru the tunnel networks that link Gaza with Egypt and Israel.

During meetings with a small group of American national security experts and journalists in Cairo in mid-May, de facto president el-Sissi and other senior members of the transition government confirmed that Egypt had quietly increased military cooperation with Israel to combat Islamist terrorism in the Sinai and stabilize Egypt.

They characterized Egyptian-Israeli cooperation as "never better," attributing the decline in terrorist attacks in Egypt's Sinai and the mainland partly to that enhanced coordination. El-Sissi told the group, including this reporter, that restoring security in the Sinai was crucial to achieving his top priority -- jump-starting growth in Egypt, 45 percent of whose 94 million people live in poverty.

The officials said that Egypt's army had already sealed, closed or destroyed up to 2,000 entrances and exits to tunnels from militant Gaza, some of which stretch up to a mile long between the strip's 1.7 million besieged Palestinians and Egypt.

Israeli soldiers killed one Palestinian militant and wounded others who tried, but failed to use such a tunnel to smuggle themselves into Israel.

For Palestinians in Gaza, the tunnels are a life-line that transport not just weapons, but foodstuffs, petrol and gas, medicines, and even livestock into Gaza. Their closure was estimated to have cost Hamas, some $250 million in lost customs duties and revenue. As a result, Hamas has had trouble paying salaries of its 43,000 government employees in Gaza. Egypt also called Hamas, which has strong historic and ongoing links to the Muslim Brotherhood, a threat to Egyptian national security. In March, Egypt's judiciary barred Hamas from conducting political activities in Egypt.

While rejecting Egypt's mediation, Hamas has irritated Egypt by calling for Turkey and Qatar to help mediate an end to the fighting, which has killed one Israeli and over 230 Palestinians, including four children on a beach, in nearly 10 days of fighting. Turkey is a longstanding rival to Egypt and oil-rich Qatar provided substantial aid to the Muslim Brotherhood when President Morsi was in power.

That being said, Egypt wanted to avoid the escalation scenarios that Israel is now engaged in.

As Alon Pinkas wrote this week in Israel's Yediot Ahranot, Israeli Prime Minister Benjamin Netanyahu and the Israeli cabinet explored at least three options for escalation proposed by the Israeli military absent a cease fire –increasing air strikes on Gaza, a limited ground offensive in the northern part of the Gaza Strip where many tunnels and rocket batteries are believed to the concentrated, and a broad ground offensive that would involve the temporary re-occupation of Gaza. Foreign Minister Avigdor Lieberman and other hawks in the Cabinet lobbied for a full blown re-occupation of Gaza, from which Israel withdrew in 2005.

The Obama administration has endorsed Israel's right to defend itself and its citizens against Hamas attacks.

Both Israel and Egypt have rejected Hamas' demands, putting them in a de facto alliance against Hamas, a militant group that the U.S. has declared a terrorist organization.