(Adds details) By Nidal al-Mughrabi GAZA, March 19 (Reuters) - Hamas, in its first rift with Fatah since forming a Palestinian unity government, accused President Mahmoud Abbas on Monday of acting illegally by naming one of the Islamist group's foes as national security adviser. Mohammad Dahlan, one of Fatah's most powerful leaders and a possible successor to Abbas, led a crackdown on Hamas Islamists as Gaza security chief in the 1990s. In recent months, Hamas accused Dahlan of trying to assassinate Prime Minister Ismail Haniyeh of Hamas and of unofficially commanding pro-Fatah forces in fierce factional fighting before the unity government was sealed. "Hamas sees the step by President Mahmoud Abbas to appoint Mohammad Dahlan, a lawmaker, as his adviser for national security as a violation of Palestinian law," Hamas said in a statement. "The president of the authority did not consult Hamas or anybody else when he took the decision," Hamas spokesman Fawzi Barhoum said. "We hope that the president will reconsider this decree." Appointing Dahlan was Abbas's first official act after swearing in the new government on Saturday, giving him a key role in the chaotic security hierarchy at a time when both sides say they want to end internal warfare. TENSIONS HIGH The unity deal has quelled most of the fighting, which killed more than 300 Palestinians in the past year, but tensions remain high. As the unity deal was being finalised last week, a Fatah intelligence officer was shot dead by unidentified gunmen, a BBC correspondent was kidnapped and a U.N. relief convoy attacked. Abbas and Haniyeh agreed to appoint Hani al-Qawasmi, an academic with no security experience, as interior minister. Officials say Qawasmi is unlikely to wield much power. At a Gaza ceremony, outgoing Interior Minister Saeed Seyam told Qawasmi of the difficulties he faced controlling Gaza's rising lawlessness. "I say to my people that nobody is going to be above the law," Qawasmi replied. "All of us are under the law and all of us are equal before the law." Abbas wants Dahlan to be the top adviser and secretary of a new umbrella Palestinian National Security Council that will, in theory, oversee the divided security services. Palestinian officials and analysts say the fate of Hamas's Executive Force will be the most difficult problem to solve. Hamas says it is pushing ahead with plans to double the size of the force to 12,000. Fatah wants the Executive Force to be dismantled or absorbed into the other services, which are dominated by Fatah. Dahlan is a favourite of the United States but it is unclear what direct role Washington will play from now on. An $86 million U.S. plan to train and equip Abbas's security forces has been put on hold because of congressional concerns about his power-sharing deal with Hamas. But some of the work is going ahead using European and Arab funds, Western diplomats said.