(Reuters) - Hamas wants written guarantees from the United States for a permanent ceasefire and withdrawal of Israeli forces from the Gaza Strip in order to sign off on a U.S.-backed truce proposal, two Egyptian security sources said.

Mediators Qatar and Egypt said Hamas had responded on Tuesday to the phased ceasefire plan for an end to the eight-month war between Israel and the Palestinian militant group, without giving details.

The plan was made public at the end of May by U.S. President Joe Biden. It entails the gradual release of Israeli hostages held in Gaza and pullback of Israeli forces over two phases, as well as the freeing of Palestinian prisoners, with the reconstruction of the war-shattered territory and return of the remains of deceased hostages in a third phase.

The United States has said Israel accepted the proposal, but Israel has not publicly stated this.

The Egyptian sources and a third source with knowledge of the talks said Hamas had concerns that the current proposal does not provide explicit guarantees for the transition from the first phase of the plan, which includes a six-week truce and the release of some hostages, to the second phase, which includes a permanent ceasefire and Israeli withdrawal.

The Egyptian sources said Hamas would only accept the plan if the guarantees were in place, and Egypt was in contact with the U.S. about the demand.

"Hamas wants reassurances of an automatic transition from one phase to another as per the agreement laid out by President Biden," the third source said.

Hamas and Egyptian authorities did not immediately respond to requests for comment.

When he announced the plan, Biden said that if negotiations to move to the second phase lasted longer than six weeks, the ceasefire would continue as those negotiations were extended.

U.S. Secretary of State Antony Blinken said on Wednesday that Hamas had proposed numerous changes to the ceasefire proposal, some of them unworkable.

Earlier, an Israeli official speaking on condition of anonymity said Hamas had "changed all of the main and most meaningful parameters", characterising the group's response as a rejection of Biden's proposal for a hostage release.

One non-Israeli official briefed on the matter, who also declined to be identified, said that in its response, Hamas had proposed a new timeline for a permanent ceasefire with Israel and withdrawal of Israeli troops from Gaza, including Rafah.

But senior Hamas official Osama Hamdan denied that the group had put forward new ideas, accusing the U.S. of going along with Israel to "evade any commitment" to a blueprint for a permanent ceasefire. Hamas has described its response as "positive" and as opening a "wide pathway" to an agreement.

More than 37,000 Palestinians have been killed in Israel's offensive in the Gaza Strip, according to health officials in the Hamas-ruled coastal enclave.

The war began when Hamas militants attacked Israel on Oct. 7, killing 1,200 people and abducting some 250 others, according to Israeli tallies.

Negotiators from the U.S., Egypt and Qatar have been trying for months to mediate a ceasefire and free the hostages, more than 100 of whom are believed to remain captive in Gaza.

(Reporting by Ahmed Mohamed Hassan and Andrew Mills; writing by Aidan Lewis; editing by Toby Chopra and Mark Heinrich)

By Ahmed Mohamed Hassan and Andrew Mills