Palestinian Authority Chairman Mahmoud Abbas on Sunday issued a decree outlawing the armed groups of Hamas and said its members would be prosecuted.
The ban applied to Hamas's Executive Force, and to the group's other armed wings, according to the decree.
Abbas wrote that he decided to "consider the Executive Unit and the militias of the Hamas movement illegal, due to their military coup against the Palestinian legitimacy and its institutions."
"Anyone who is involved in any of these two groups is going to be punished, according to the law and the orders of the state of emergency," the decree said.
Hamas spokesman Sami Abu Zuhri said that Abbas "unfortunately is involved in the American-Israeli conspiracy, along with some Arab parties, to bring down the Hamas movement.
"Hamas as a movement has ties and roots to the hearts of the Palestinians, and the resistance will continue and cannot be stopped," he said.
The decree came as a new PA cabinet headed by former finance minister Salaam Fayad was sworn in.
In taking office, Fayad said the new government would work to end the chaos and provide security for the Palestinians.
"We are going to work with clean hands, systematically," he said.
Addressing the Palestinians in Gaza, he said: "You are in our hearts, and the top of our agenda. The dark images, the shameful things that are alien to our traditions ... are not going to stop us."
It is "time to work together for Palestine," he said.
Fayad said "The first piority of our government is security and the security situation. The mission will be difficult and hard, but not impossible."
In Gaza, Haniyeh called the new government illegal and insisted he would remain in power. "The council of ministers considers the steps adopted by President Mahmoud Abbas to ... have no basis in law," he said. "The national unity government asserts here that we are fulfilling our duty according to our law."
Likewise, Hamas spokesman Ismail Radwan said: "The Islamic Resistance Movement considers this government illegitimate and illegal. We will not recognize it. We will not work with it."
Despite its opposition to the government, Radwan said Hamas would not punish ministers in the new government who come from Gaza.
Khaled Abu Toameh contributed to this report