Palestinian Prime Minister Rami Hamdallah left the Gaza Strip on Thursday after a four-day visit aimed at reconciliation with rival party Hamas, an AFP journalist said.
Hamas agreed to hand over power to a unity government last month and Hamdallah's visit, the first since 2015, saw his ministers take control of ministries in Gaza.
The move is part of wider attempts to end a decade-long split between the internationally recognised Palestinian Authority, which is based in the occupied West Bank, and Hamas, which runs Gaza.
The two sides are set to meet for further talks in the Egyptian capital Cairo on Tuesday.
Before leaving on Thursday morning, Hamdallah and a number of his ministers visited the largest hospital in the Gaza Strip, as well as a desalination plant.
He then left with his ministers through the Erez crossing in northern Gaza, which is controlled by Israel, an AFP videographer said.
He is due to return to Ramallah in the West Bank where a meeting of senior members of Fatah, the secular party that dominates the Palestinian Authority, will be held on Thursday evening.
Palestinian President Mahmud Abbas said the Fatah meeting would discuss the next steps towards reconciliation ahead of the Cairo talks.
"National unity is a noble goal for us and we have high hopes for it, because without it there is no Palestinian state," Abbas said, in remarks carried by state news agency Wafa.
Hamas, in a statement, said: "The Gaza Strip and its ministries are under the administration of the national reconciliation government. Hamas will work to support and strengthen its role."
Hamas has ruled the territory since 2007, when it seized it from the Palestinian Authority in a near civil war, and multiple previous reconciliation attempts have failed.
Hamas has fought three wars with Israel since 2008.
One of the main stumbling blocks to reconciliation is likely to be Hamas's military wing, with senior officials rejecting the idea of disarming.
Two million people live in Gaza, blockaded by Israel and Egypt and suffering from poverty and electricity shortages.