Thirty-nine Palestinian prisoners will be released on Friday as part of agreement between Israel and Hamas for the release of the hostages from Gaza, an Israeli official told CNN.

Prisoners will be transferred from two prisons – Demon and Megiddo, both southeast of Haifa – to Ofer prison south of Ramallah in the occupied West Bank, for final checks by the Red Cross.

From there they will be driven through the nearby Beitounia crossing point and will continue to their homelands and villages in the West Bank.

Women and teenagers up to 18 seem to be the “profile” of prisoners to be released.

The exact time of the release is unclear, but the Israeli official clarified that the prisoners they will not be released until the hostages from Gaza are returned to Israeli hands.

These hostages – which CNN reported on that there are 13 women and children – they are expected to be released at 4 pm (Israel time and Greece time).

The official clarified that the hostages will enter Israel at two locations, the Nijana border crossing with Egypt and directly through the Kerem Shalon crossing from Gaza.

Once back on Israeli soil, the freed hostages will be transported by helicopter in two hospitals near Tel Aviv, the official added.

The temporary ceasefire between Israel and Hamas will begin at 7 a.m. Friday, Qatar’s foreign ministry announced earlier.

Hamas’ military wing confirmed earlier that the ceasefire would take effect in the morning on Friday and will last four days.

And the office of Israeli Prime Minister Benjamin Netanyahuafter Qatar’s announcement confirmed that Israel had received an “initial” list of names of abductees expected to be released.

“Relevant officials are checking the details of the list and are currently in contact with all families,” the statement said.