DEIR AL-BALAH, Gaza Strip >> Qatar says an agreement has been reached to release an Israeli civilian hostage and allow Palestinians to return to northern Gaza. The deal eases the first major crisis of the ceasefire between Israel and Hamas.

Qatar’s statement early Sunday says Hamas will hand over the civilian hostage, Arbel Yehoud, along with two other hostages before Friday. Sunday, Israeli authorities allowed Palestinians to return to northern Gaza.

The office of Israel’s prime minister in a statement says the hostage release will take place Thursday and confirms that Palestinians can move north.

Under the ceasefire, Israel on Saturday was to begin allowing Palestinians to return to their homes in northern Gaza. But Israel put that on hold because of Yehoud, who Israel said should have been released Saturday. Hamas accused Israel of violating the agreement.

Thousands of Palestinians have gathered to wait to move north.

Israel kept thousands of Palestinians from returning to their homes in northern Gaza Sunday as it accused Hamas of violating a fragile ceasefire by changing the order of hostages it has released. Local health officials said Israeli forces fired on the crowd, killing two people and wounding nine.

Israeli forces also opened fire in Lebanon on protesters demanding their withdrawal by Sunday’s deadline under a separate ceasefire with the Hezbollah militant group. Health officials in Lebanon said at least 22 people were killed and over 120 wounded. Israel says it hasn’t withdrawn because Lebanese forces are not deploying quickly enough, while Crowds of people carrying their belongings filled a main road leading to a closed Israeli checkpoint. “We have been in agony for a year and a half,” said Nadia Qasem.

Fadi al-Sinwar, also displaced from Gaza City, said “the fate of more than a million people is linked to one person,” referring to the Israeli hostage, Arbel Yehoud. “See how valuable we are? We are worthless,” he said.

Israeli forces fired on the crowds on three occasions overnight and into Sunday, killing two people and wounding nine, including a child, according to Al-Awda Hospital, which received the casualties.

Israel’s military in a statement said it fired warning shots at “several gatherings of dozens of suspects who were advancing toward the troops and posed a threat to them.”

Israel has pulled back from several areas of Gaza under the ceasefire, which came into effect last Sunday. The military has warned people to stay away from its forces, which still operate in a buffer zone inside Gaza along the border and in the Netzarim corridor.