Once again—for the ninth time, in fact—the Egyptians have demonstrated an ability to bring a halt to hostilities between Israel and Hamas and the Palestinian Islamic Jihad in the Gaza Strip. Once again, Egypt held direct negotiations with the two terrorist groups while blatantly ignoring the Palestinian Authority and its leader, Mahmoud Abbas. And once again, Egypt scored points both at home and throughout the region, emerging as an important player in the Middle East.

After so many rounds of conflict, Egypt has enough experience to become the most acceptable mediator to all sides. Egyptian President Abdel Fattah El-Sisi operates under a three-step program: ceasefire, reconciliation, solution. On the face of things, these three elements might appear disparate, but in fact they are part of a single, solid policy.

The first step is to secure quiet between Israel and Gaza, lasting as long as possible. The restored quiet allows the Egyptians to get back to their fierce battle against terrorism in the Sinai Peninsula, which despite enormous efforts and assistance from Israel the Egyptians are having difficulty rooting out. Cairo fears that terrorism will make its way across the Suez Canal and strike in the heart of the country. Calm between Israel and Gaza allows Egypt to concentrate more effort on fighting terrorism in Sinai, which is why it is working diligently as a broker between Israel and Gaza.

But restoring quiet is not a goal in and of itself. It is a vital precondition for moving to the next stage of the plan: intra-Palestinian reconciliation. Cairo wants to see the P.A. back in control of Gaza, in place of Hamas, and is not deterred by its failures thus far to reconcile the two sides. Egypt also isn’t in despair over the socioeconomic gap between the Palestinians living on the Gaza coast and the ones who live on the hills of Ramallah, Nablus and Hebron. A successful reconciliation between Fatah and Hamas would put Gaza back in the hands of the P.A., bringing stability and quiet.

Once the P.A. returns to Gaza as part of a reconciliation deal with Hamas, leading to long-term quiet, the third and last stage of El-Sisi’s plan can get underway: solving the Israeli-Palestinian conflict. Cairo believes that a long-term ceasefire and putting Abbas back in charge of Gaza will give Israel the security it demands. Israel will then feel safe enough to re-start negotiations for a peace deal, which will end its conflict with the Palestinians.

An Egyptian intelligence official told me that Egypt is willingly taking action to secure a ceasefire, because ongoing quiet is good for everyone and allows Egypt to progress towards its end goal of solving the larger conflict, which dovetails with El-Sisi’s repeated calls for the Palestinians to learn from Egypt’s successful experiment in making peace with Israel. Jerusalem can be happy that Egypt has a president who is putting Israel’s security needs at the center of his political and strategic plans.

This column first appeared on Israel Hayom.