The first two cases of coronavirus have been confirmed in the densely-populated Gaza Strip, Palestinian health officials said on Sunday.

The two Palestinian men, both in their 30s, tested positive for the virus after returning from Pakistan via Egypt late on Saturday and were being held in a quarantine areas set up in the border town of Rafah, the Gaza health ministry said.

They were in stable condition, it said.

"Thank God, the circle of contact wasn't big," Salama Marouf, chairman of the Gaza government media office, told Reuters.

All those who were in contact with the two men had also been quarantined, he said, without immediately giving a number.

Schools, public markets and event halls have all been shut in Gaza over the past two weeks to minimise the risk of coronavirus transmission.

The coastal enclave, measuring 375 square kilometres (145 square miles) is home to around two million Palestinians.

An Israeli blockade, supported by Egypt, has restricted cross-border movement for years, amid security concerns following the 2007 takeover of Gaza by the Islamist militant group Hamas.

Last week Hamas said it would allow only patients requiring urgent medical treatment outside Gaza to cross into Egypt or Israel.

On Saturday, Israel's military liaison to the Palestinians said it was closing borders with Gaza as well as with the occupied West Bank to commercial traffic, though some patients and humanitarian staff could cross.

The Palestinian health ministry lists 59 confirmed coronavirus cases in the occupied West Bank. The number of confirmed cases in Israel is 945.

The crisis has stirred occasional proposals of cooperation despite simmering hostilities over the Gaza border.

Fayez Abu Shammala, a Gaza intellectual often identified with Hamas, suggested Palestinian armed factions seek a truce.

"Since our Israeli enemy is sick with coronavirus, our Arab morals oblige us to make truce with them at this stage. Let's be merciful even with our enemy," he said in a March 13 tweet.

Brigadier-General Hidai Zilberman, the Israeli military's chief spokesman, said on Army Radio on Sunday "all the terrorist organisations" in the Middle East have "lowered their level of terrorist activity" as a result of the health crisis.