On 14 June 2007, Abbas dissolved the Hamas-led unity government of Haniyeh, declared a state of emergency, and appointed Salam Fayyad in his place. This followed action by Hamas armed forces to take control of Palestinian Authority positions controlled by Fatah militias. The appointment of Fayyad to replace Haniyeh has been challenged as illegal, because under the Palestinian Basic Law, the president may dismiss a sitting prime minister, but may not appoint a replacement without the approval of the Palestinian Legislative Council. According to the law, until a new prime minister is thus appointed, the outgoing prime minister heads a caretaker government. Fayyad's appointment was never placed before, or approved by the Legislative Council. For this reason, Haniyeh, the Hamas prime minister has continued to operate in Gaza, and is recognised by a large number of Palestinians as the legitimate acting prime minister. Anis al-Qasem, a constitutional lawyer who drafted the Basic Law, is among those who publicly declared Abbas's appointment of Fayyad to be illegal.