(Adds quotes, background)
CAIRO, July 24 (Reuters) - U.S. Secretary of State John Kerry will soon decide if Hamas and Israel are willing to agree on a Gaza ceasefire and will not stay in the region indefinitely, a senior U.S. official said Thursday, in what appeared an effort to pressure the parties.
"Gaps remain between the parties, so his focus is on finding a formula that both sides can accept," said the U.S. official in an emailed comment. "But he isn't here for an indefinite amount of time and in the near future he will determine whether there is a willingness to come to an agreement on a ceasefire."
Gazan authorities said Israeli forces shelled a shelter at a U.N.-run school in the Gaza Strip on Thursday, killing at least 15 people as the Palestinian death toll in the conflict climbed over 750 and attempts at a truce remained elusive. The Israeli military said its troops were fighting gunmen from Hamas, which runs Gaza, in the area and that it was investigating.
Kerry spent his fourth day in the region talking to world leaders to try to end the 17-day conflict, in which Israel has lost at least 32 soldiers in clashes as well as three civilians killed inside Israel by Palestinian rockets and mortar fire.
"Secretary Kerry will stay in Egypt through at least tomorrow morning to continue working on achieving a ceasefire," the U.S. official said, adding he had spoken by telephone in the last 24 hours with Israeli Prime Minister Benjamin Netanyahu and with the foreign ministers of Britain, Egypt, France, Germany, Jordan, Norway, Turkey and Ukraine.
He also spoke to EU foreign policy chief Catherine Ashton and was due to meet U.N. Secretary-General Ban Ki-moon in Cairo later in the evening, the U.S. official added.
"The focus of his conversations is on determining whether there is a way to stop the fighting and commence negotiations necessary to achieving a sustainable ceasefire and enduring resolution to the crisis in Gaza," the U.S. official said. (Reporting by Arshad Mohammed; Editing by Sonya Hepinstall)