JERUSALEM  Palestinian Authority forces clashed with Hamas militants in the West Bank early on Sunday, leaving six dead in the bloodiest such encounter in two years.

The violence erupted days after the Palestinian president, Mahmoud Abbas, assured President Obama in Washington that his troops were imposing order on the area. In Gaza, Hamas reacted by arresting Fatah activists and hinting of further revenge.

The clashes and threats show that Fatah, which dominates in the West Bank, and Hamas, which runs Gaza, remain in a tense standoff, and that the Palestinian unity needed for creation of a state is far off. Both sides said unity talks mediated by Egypt were imperiled.

A spokesman for Mr. Abbas’s West Bank forces, Adnan Dameiri, told a news conference in Ramallah that a patrol in the city of Qalqilya had come under fire on Saturday night from a house, leading to a curfew and negotiations lasting for hours. During the negotiations, a grenade was thrown from the house, killing three security officers, Mr. Dameiri said. Palestinian Authority forces then stormed the house, and two Hamas militiamen, including one of its leaders, were killed, along with the owner of the house that the militants had commandeered.