Oct 20 (Reuters) - Palestinian Prime Minister Ismail Haniyeh of Hamas, who was unhurt when gunmen fired on his motorcade on Friday, said he would reject any moves by President Mahmoud Abbas to oust his government. Following are Abbas's powers under the Palestinian basic law, which functions as a constitution. Any option he takes could stoke further internal violence and lead to civil war. ABBAS'S POWERS The president has the authority to dismiss the prime minister, which would effectively remove the government. Abbas could appoint a new prime minister, who would then name a cabinet, but this would require the approval of parliament, in which the Hamas Islamist movement has a majority. However, around 30 Hamas lawmakers are in Israeli custody, having been detained following the abduction of a soldier by militants in Gaza in late June. It is unclear how this would affect voting. Hamas won 74 seats in the 132-member parliament in January elections. Abbas's Fatah movement holds 45. STATE OF EMERGENCY Abbas could also declare a state of emergency to sack the government, arguing that crippling Western sanctions, Hamas's unwillingness to agree to his proposals for a unity government and internal violence warrant such a move. He could form an emergency cabinet if he declared a state of emergency. But the basic law says the president can declare a state of emergency by decree for not more than 30 days. This can be extended for 30 days with approval of two thirds of parliament. The parliament cannot be dissolved or suspended during any emergency. EARLY ELECTIONS The basic law has no provision on calling early parliamentary elections. Fatah officials say this allows Abbas to do so. Hamas contends it would be illegal while some experts say it would be impossible without the legal framework. HOLDING A REFERENDUM Abbas has said he might hold a referendum on any option if he feels it does not have constitutional foundations. The basic law itself does not mention holding referendums and some legal experts say this means Abbas could do so. Hamas and other experts argue such a move would also be illegal. REMOVING THE PRESIDENT Parliament does not have the authority to impeach the president. Calling new presidential elections would mean changing the basic law. Any amendment requires the approval of two thirds of parliament.