The Israeli government has approved the Gaza ceasefire and hostage-prisoner exchange deal after a cabinet meeting that lasted more than six hours, according to Prime Minister Benjamin Netanyahu's office.
The green light means a six-week ceasefire between Israel and Hamas can begin on Sunday, with the gradual release of Israeli hostages and Palestinian prisoners in Israeli jails to begin soon after.
The approval came shortly after 1am on Saturday in Jerusalem.
The ceasefire will start at 8:30am, local time, on Sunday (5:30pm AEDT).
Qatar's foreign ministry spokesperson made the announcement on social media.
In the first phase of the deal, 33 Israeli hostages will gradually be released by Hamas, Israeli forces will start withdrawing from parts of Gaza, and hundreds Palestinian prisoners in Israeli jails will be freed.
This deal does not amount to an end to the war in Gaza, with further negotiations between Israel and Hamas required to enable a lasting peace.
Media reports said 24 ministers in Netanyahu's coalition government voted in favour of the deal while eight opposed it.
The Israeli security cabinet voted in favour of the ceasefire accord on Friday, the first of two approvals required.
Some religious MPs broke the Jewish Sabbath — or day of rest — on Friday evening, local time, to ensure their voices were heard.
The ratification effectively means the final political hurdle is en route to ending the 15-month-long war in Gaza would be cleared.
The ceasefire is due to begin on Sunday.
The complex agreement will see hostages being held by Hamas, and other militant groups in Gaza, released and thousands of Palestinian prisoners in Israeli jails freed.
Even prior to the deal being rubber-stamped by parliament, Israel's government has provided a list of 95 Palestinian prisoners it is planning to release, which it says won't happen until after 4pm, local time.
Israel's justice ministry said on Saturday that 737 prisoners and detainees will be freed as part of the first phase of the ceasefire.
In a statement on its website, the justice ministry said: "The government approves" the "release [of] 737 prisoners and detainees" currently in the custody of the prison service.
Hamas is expected to name the three hostages, who are all women, it is going to release about 24 hours before they're freed.
The deal, which includes multiple phases, will eventually see Israel's military withdraw from its positions in Gaza.
The terms of the ceasefire were announced late Wednesday, local time, in Qatar.
Mr Netanyahu's office on Thursday released a statement claiming Hamas had "reneged on parts of the agreement", something the militant group denied.
There was also speculation the Israeli government's cabinet vote on the deal would be delayed for religious reasons.
Religious Jews observe a day of rest, known as the Sabbath or Shabbat, from sunset Friday to sunset Saturday.
Things like driving in cars or working are forbidden, although it can be broken to save Jewish lives in emergencies.
The cabinet met at 3:30pm Friday, local time, with sunset expected about 90 minutes later.
After 11pm Friday (7am Saturday AEST).
The religious Shas Party, which is part of Mr Netanyahu's coalition government, released a statement saying that for the sake of saving lives they would be prepared to break the Sabbath.
Meanwhile, some other ultra-orthodox MPs prepared letters before sunset in which they declared their support for the deal, to ensure their votes counted. Then they left.
Upon entering the meeting, Religious Affairs Minister Michael Malchieli left a note in the government secretariat, in which he wrote his name, "in favour" and then a well-known Jewish religious expression: "Whoever saves one Jewish life, it is as if he saved an entire world."
Some members of Mr Netanyahu's coalition, which includes multiple parties, have been critical of the ceasefire agreement.
Israeli National Security Minister Itamar Ben-Gvir had vowed to quit if the deal was approved.
Before the vote, he wrote in a post on the social media platform X that he was "terrified" about the deal.
He posted: "If until yesterday I was terrified of this deal, then today, when more and more details are revealed, when it is revealed that terrorists serving life sentences are being released to Jerusalem, terrorists serving life sentences are being released to Judea and Samaria, when everyone knows that these terrorists will try to harm again, will try to kill again, I am even more terrified."
Earlier on Friday, Israel's National Security Council (NSC) approved the deal.
It released a statement saying: "After examining all political, security and humanitarian aspects; and with the understanding that the proposed deal supports the achievement of the war's goals, the Ministerial Committee for National Security Affairs (Political-Security Cabinet) recommended that the government approve the proposed outline."
The NSC is a staff forum that consults on issues of national security in Israel. It's part of the prime minister's office and reports to him directly.
Gaza's health ministry says more than 48,000 people in the territory have been killed since the war began on October 7, 2023, when Hamas militants broke through the border fence and launched a deadly attack in Israel, killing some 1,200 people, mostly civilians.