After Hamas won the Palestinian legislative elections on 25 January 2006, Ismail Haniyeh was nominated Prime Minister, establishing a Palestinian national unity government with Fatah. This government effectively collapsed with the outbreak of the violent conflict between Hamas and Fatah. After the takeover of the Gaza Strip by Hamas on 14 June 2007, Palestinian Authority Chairman Abbas dismissed the Hamas-led government and appointed Salam Fayyad Prime Minister. Though the new Ramallah-based Palestinian government's authority was claimed to extend to all Palestinian territories, in effect it became limited to the West Bank, as Hamas would not recognized the dismissal and continued to rule the Gaza Strip. Both administrations – the Fatah government in Ramallah and the Hamas government in Gaza regarded themselves as the sole legitimate government of the Palestinian National Authority. The international community and Palestine Liberation Organization, however, recognized the Ramallah administration as the legitimate government.