On 20 February, Hamas leader Ismail Haniyeh was nominated to form a new government. The new government with Haniyeh as Prime Minister was sworn in on 29 March. These were the last contested elections to be held before Hamas took over the Gaza Strip in 2007; no new elections have been held since.
In the Palestinian legislative elections on 25 January 2006, Hamas emerged victorious and nominated Ismail Haniyeh as the Authority’s Prime Minister. However, the national unity Palestinian government effectively collapsed, when a violent conflict between Hamas and Fatah erupted, mainly in the Gaza Strip. After the Gaza Strip was taken over by Hamas on 14 June 2007, the Authority’s Chairman Mahmoud Abbas dismissed the Hamas-led unity government and appointed Salam Fayyad as Prime Minister, dismissing Haniyeh. The move wasn’t recognized by Hamas, thus resulting in two separate administrations – the Fatah-led Palestinian Authority in the West Bank and a rival Hamas government in the Gaza Strip.
https://en.wikipedia.org/wiki/2006_Palestinian_legislative_election
Thanks for the clarification. I’ve updated my comment to be more accurate.
https://en.wikipedia.org/wiki/Palestinian_National_Authority