Yahia al-Sinwar, center, the Gaza Strip chief of the Palestinian Islamist Hamas movement, waves to supporters during a rally marking the 35th anniversary of the group s foundation, in Gaza City, Wednesday, Dec. 14, 2022. AP
"In the face of the occupation's (Israel's) stalling on this issue, we announce that we give them a limited time to finalise this deal," Yahya Sinwar, Hamas chief in Gaza, said during a rare public appearance.
"Otherwise, we will close the case of the four enemy prisoners from the side of the resistance forever," he added, at a rally marking the 35th anniversary of the group's establishment.
Since Israel's 2014 invasion of the Gaza Strip, the Islamist group has held the bodies of Israeli soldiers Oron Shaul and Hadar Goldin, although Hamas has never confirmed their deaths.
Earlier this year Hamas published a video of an Israeli civilian detained for seven years in the enclave.
Another civilian is also believed to be held by the group after scaling the barrier into Gaza in 2014.
There is no official contact between the two sides. Egypt and the United Nations have served as mediators in the past.
Sinwar said indirect negotiations over a prisoner exchange were "interrupted because of the elections" in Israel.
Benjamin Netanyahu is on the cusp of forming Israel's most right-wing government yet, comprised of factions that are hawkish towards the Palestinians.
The veteran politician was premier in 2011 when Israel released more than 1,000 Palestinian prisoners, in exchange for soldier Gilad Shalit who had been held by Hamas for five years.
Israel has imposed a crippling blockade on Gaza since 2007, when Hamas took power in the enclave.
Israeli forces and Gaza militants have fought four wars during the blockade, in addition to a three-day conflict this August in which 49 Palestinians were killed.