DEIR AL-BALAH, Gaza Strip (AP) — Israeli media say the Hamas militant group has released the first batch of hostages under a cease-fire deal Friday, including 13 Israelis who have been held in the Gaza Strip for nearly seven weeks.

The media cited Israeli security officials.

Twelve Thai nationals were also released, according to Thai Prime Minister Srettha Thavisin.

In all, 50 captives are set to be freed during a four-day truce.

Israel is set to free 150 Palestinians over the next four days, as part of the deal. Thirty-nine prisoners are to be freed Friday.

THIS IS A BREAKING NEWS UPDATE. AP’s earlier story follows below.

DEIR AL-BALAH, Gaza Strip (AP) — A four-day cease-fire between Israel and Hamas began Friday, allowing sorely needed aid to start flowing into Gaza and setting the stage for the release of dozens of hostages held by militants and Palestinians imprisoned by Israel.

There were no reports of fighting in the hours after the truce began. The deal offered some relief for Gaza's 2.3 million people, who have endured weeks of Israeli bombardment and dwindling supplies of basic necessities, as well as for families in Israel worried about loved ones taken captive during Hamas’ Oct. 7 attack, which triggered the war.

The first exchange Friday afternoon would involve swapping 39 Palestinian prisoners — 24 women, including some convicted of attempted murder for attacks on Israeli forces, and 15 teenagers jailed for offenses like throwing stones — for 13 Israeli hostages, Palestinian authorities said.

Just before that exchange was set to happen, Thai Prime Minister Srettha Thavisin later said in a tweet that 12 Thai nationals were also released. An Israeli official confirmed that the Thai captives left Gaza and were en route to a hospital in Israel. The official spoke on condition of anonymity because she was not authorized to discuss the releases with the media.

The truce raised hopes of eventually winding down the conflict, which has flattened vast swaths of Gaza, fueled a surge of violence in the occupied West Bank and stirred fears of a wider conflagration across the Middle East. Israel, however, has said it is determined to resume its massive offensive once the cease-fire ends.

On Friday, it brought quiet after weeks in which Gaza saw heavy bombardment and artillery fire daily as well as street fighting as ground troops advanced through neighborhoods in the north. The last report of air raid sirens in Israeli towns near the territory came shortly after the truce took effect.

Not long after, four tankers with fuel and four with cooking gas entered the Gaza Strip from Egypt, Israel said.

Israel has agreed to allow the delivery of 130,000 liters (34,340 gallons) of fuel per day during the truce — still only a small portion of Gaza’s estimated daily needs of more than 1 million liters.

For most of the past seven weeks of war, Israel had barred the entry of fuel to Gaza, claiming it could be used by Hamas for military purposes — though it has occasionally allowed small amounts in.

U.N. aid agencies pushed back against the claim, saying fuel deliveries were closely supervised and urgently needed to avert a humanitarian catastrophe since fuel is required to run generators that power water treatment facilities, hospitals and other critical infrastructure.

The Israeli military dropped leaflets over southern Gaza, warning hundreds of thousands of displaced Palestinians who sought refuge there not to return to their homes in the territory's north, the focus of Israel’s ground offensive.

Even though Israel warned that it would block such attempts, hundreds of Palestinians could be seen walking north Friday.

Two were shot and killed by Israeli troops and another 11 were wounded. An Associated Press journalist saw the two bodies and the wounded as they arrived at a hospital.

Sofian Abu Amer, who had fled Gaza City, said he decided to risk heading north to check on his home.

“We don’t have enough clothes, food and drinks,” he said. ”The situation is disastrous. It’s better for a person to die."

During the cease-fire, Gaza’s ruling Hamas group pledged to free at least 50 of the about 240 hostages it and other militants took on Oct. 7. Hamas said Israel would free 150 Palestinian prisoners.

Both sides agreed to release women and children first, in stages starting Friday. Israel said the deal calls for the truce to be extended an extra day for every additional 10 hostages freed.

Early in the day, ambulances were seen arriving at the Hatzerim air base in southern Israel, preparing for the release. Those freed will then be taken to hospitals for assessment and treatment, Israeli officials said.

Among the Israeli citizens to be freed some have a second nationality, according to a Hamas official who spoke on condition of anonymity because he was not authorized to discuss the details with the media.

Israel’s Justice Ministry published a list of 300 prisoners eligible for release, mainly teenagers detained over the past year for rock-throwing and other minor offenses. Three Palestinian prisoners are expected to be released for every hostage freed.

The hope is that “momentum” from the deal will lead to an “end to this violence,” said Majed al-Ansari, a spokesman for the Foreign Ministry of Qatar, which served as a mediator along with the United States and Egypt.

But hours before it came into effect, Israeli Defense Minister Yoav Gallant was quoted telling troops that their respite would be short and that the war would resume with intensity for at least two more months.

Prime Minister Benjamin Netanyahu has also vowed to continue the war to destroy Hamas’ military capabilities, end its 16-year rule in Gaza and return all the hostages.

Israel's northern border with Lebanon was also quiet on Friday, a day after the militant Hezbollah group, an ally of Hamas, carried out the highest number of attacks in one day since fighting there began Oct. 8.

Hezbollah is not a party to the cease-fire agreement, but was widely expected to halt its attacks.

The war erupted when several thousand Hamas militants stormed into southern Israel, killing at least 1,200 people, mostly civilians, and taking scores of hostages, including babies, women and older adults, as well as soldiers.

The soldiers will only be released in exchange for all Palestinians imprisoned by Israel, according to the Islamic Jihad militant group, which is reportedly holding about 40 hostages.

It is not clear how many of the hostages are currently serving in the military or whether the militants also consider reserve soldiers to be “military hostages.”

According to the Palestinian Prisoners’ Club, an advocacy group, Israel is currently holding 7,200 Palestinians on security charges or convictions, including about 2,000 arrested since the start of the war.

The Israeli offensive has killed more than 13,300 Palestinians, according to the Health Ministry in Hamas-ruled Gaza, which resumed its detailed count of casualties in Gaza after stopping for weeks because of the health system’s collapse in the north.

The ministry says some 6,000 people have been reported missing, feared buried under rubble.

The ministry does not differentiate between civilians and militants in its death tolls. Women and minors have consistently made up around two-thirds of the dead, though the new number was not broken down. The figure does not include updated numbers from hospitals in the north.

Israel says it has killed thousands of Hamas fighters, without presenting evidence for its count.