Palestinian prime minister Rami Hamdallah left the Gaza Strip on Thursday after a four-day visit aimed at reconciliation with rival party Hamas.