Qatar has drafted its own version of a truce offer between Israel and Hamas, The Times of Israel has learned – and it adopts almost all of Hamas’s demands.

The document underscores the power struggle being waged behind the scenes of the Gaza conflict between Cairo’s new leadership and Turkey and Qatar — two countries which supported the Muslim Brotherhood’s rule in Egypt and its ousted president Mohammed Morsi. Hamas is an offshoot of the Muslim Brotherhood, which was removed from power in Egypt in 2013 by then military chief, now president, Abdel-Fattah el-Sissi.

The Qatari document was presented to US officials, Western diplomats and Palestinian Authority President Mahmoud Abbas earlier this week, before Israel began its ground offensive in Gaza on Thursday night. Qatar reportedly demanded that the US help in mediation between the sides, excluding Egypt from the proceedings.

Promoting the document on Doha’s behalf is Qatari Foreign Minister Khalid bin Mohammed al-Attiyah, who had said in closed conversations last week that he did not believe Israel would launch a ground operation. Washington held intensive talks with Qatar over the offer but eventually chose the Egyptian proposal.

The draft stipulates that in exchange for a ceasefire, Israel will free Hamas prisoners who were released in the Gilad Shalit deal and rearrested recently in the West Bank following the kidnapping and murder of three Israeli teenagers; Israel will allow construction of a seaport or “sea crossing” in Gaza; Israel will fully open all crossings to Gaza; Egypt will open the Rafah border crossing into Egypt 24 hours a day; and Israel will allow Gaza fisherman to venture out 12 nautical miles from the Gaza coast.

The document is intended to counteract the Egyptian ceasefire offer which stated that Israel and Hamas must first stop their attacks on each other and only then discuss their respective demands. Egypt’s offer was endorsed by Israel, the US, the Palestinian Authority and the Arab League on Tuesday before being rejected by Hamas, with the group saying the offer only satisfied Israel’s interests, and met none of the Palestinian demands.

Egypt’s Foreign Minister Sameh Shukri criticized Qatar this week, saying it had conspired with Turkey to foil the Egyptian offer. Qatar is currently the place of residence of Hamas political bureau chief Khaled Mashaal.

Abbas visited Ankara on Friday where, according to reports in Arab media, the head of Palestinian intelligence Majed Faraj held secret meetings with Hamas officials in a bid to restore calm. Abbas will next head to Qatar.

Senior Palestinian officials claim that in a recent meeting between Abbas and Mashaal deputy Mousa Abu Marzouk, before Israel’s incursion into Gaza, the latter said his organization was willing to pay a heavy price to lift the security blockade imposed on Gaza by both Israel and Egypt.

“What are 200 dead for the removal of the siege?” Abu Marzouk reportedly said. The officials noted that Abu Marzouk had assessed at the time that the IDF would not enter Gaza.