The talks in Cairo among Hamas, Israel and Egypt are entering a definitive and possibly critical stage Tuesday. Israel is waving a big stick over Hamas' head in the form of a ground invasion, while the only carrot it has available is calm, although for Hamas that's a pretty big carrot.

Senior Egyptian officials involved in the talks told Haaretz on Monday that an agreement is "very close," but Israel would have to demonstrate more flexibility.

It's in everyone's interest to achieve a cease-fire soon, the same officials said; that feeling is clearly expressed in the positions of both sides. Meanwhile, Israel continues to prepare for a possible ground invasion of the Gaza Strip. It doesn't take an awful lot of imagination to see that if the diplomatic efforts led by Egyptian intelligence chief Raafat Shehata don't bear fruit within the next 24 to 48 hours the Israel Defense Forces will start moving into the Strip.

But even if Israeli troops do move in, the goal of the operation will not necessarily be ending the Hamas regime in Gaza. More likely it will be yet another facet of the indirect dialogue between Israel and Hamas, usually conducted with military operations but sometimes, as with Egyptian mediation now, through diplomatic channels. In other words, even if the talks fail and Israel ends up using its big stick it doesn't mean that the diplomatic channels will be abandoned. They may just be put on hiatus for a while until a better chance for a cease-fire presents itself.

The Hamas leadership is well aware that an IDF ground operation is possible and is worried about it. Although Hamas political bureau chief Khaled Meshal told a Cairo press conference Monday that his organization isn't afraid of a ground operation, he didn't sound too convincing.

At the briefing, which followed a long meeting with Shehata, Meshal admitted that Hamas doesn't want an Israeli ground operation. As he put it, he and his organization are pained by the loss of every Palestinian child, and particularly grieve for "my brother and dear one, Ahmed Jabari."

His words were surprisingly mild compared to the fiery speeches he's delivered in the past, and certainly compared to the inflammatory rhetoric of his Hezbollah counterpart Hassan Nasrallah. While he made encouraging statements to the Gaza fighters, he seemed to be telling them: Just hold on a little bit longer.

Indeed, aside from a few barbs aimed at Prime Minister Benjamin Netanyahu, Meshal sounded like someone who would truly prefer a cease-fire, though not at any price. In any event Netanyahu is not the only one upon whom Hamas is making demands. The organization wants Cairo to keep the Rafah border crossing open to people and goods; it isn't known whether Egypt is willing to go that extra mile.

The al-Arabiya network has reported that the fundamental pieces of a cease-fire are in place, with only the order still in dispute: Which comes first, a cessation of fire or an easing of the Gaza blockade.

But no matter how successful Egypt's mediation efforts are, one can't help but focus on the metamorphosis of Egyptian President Mohammed Morsi. At times it's hard to believe that this is the same senior Muslim Brotherhood leader who was described during the Egyptian presidential election campaign as the man who "would liberate Gaza and turn Jerusalem into the capital of the united Arab nations."

And yet this same Morsi, who for years saw Israel as a hostile entity and had difficulty even saying the word "Israel," let this country's name escape his lips a few days ago, during a joint press conference with the Turkish prime minister, another great friend of Israel. While it isn't clear whether Morsi referred to the contacts between "the Palestinian side and the Israeli side" by accident or on purpose, in these crazy days it's no small thing.