In the West Bank city of Tubas, the Palestinian Authority has been rounding up militants who are spoiling for a fight with Israel and challenging its own rule, seeking to show it can help shape the future for Palestinians after the war in Gaza.
President Mahmoud Abbas' Palestinian Authority (PA) has poured forces into Tubas, saying it aims to quash lawlessness and deny Israel pretexts to raid the city in the occupied territory.
His militant adversaries - Hamas and Islamic Jihad - say the PA is serving Israel's agenda at a time when Israel is going after their fighters in the West Bank as they battle Israel in Gaza, sharpening old divisions between the militants and Abbas.
Residents of Tubas said clashes between the militants and the PA this month involved heavy machine guns and bombs in some of the worst violence they can remember.
It highlights the precarious position of an authority formed in 1994 as a stepping stone to a state in the West Bank and the Gaza Strip with East Jerusalem as its capital, a prospect that appears as far away as ever, though it has come back into international focus of late as a way to bring peace.
The PA controlled Gaza until 2007, when Hamas routed forces loyal to Abbas, but is now confined to running patches of the West Bank under the eye of Israeli troops.
As Israel presses its Gaza offensive to wipe out Hamas, the United States has said it wants to see the territory and the West Bank unified under a reformed and revitalised PA.
For Abbas, 88, the Tubas campaign is partly about weakening the grip his militant foes have gained over the northern West Bank, in what his Fatah Movement sees as an Iran-backed attempt to undermine their position, according to Fatah officials and security sources.
It is also about disproving critics who view the PA as ineffective - a reputation that has overshadowed diplomatic contacts led by the United States over the role it might eventually play in Gaza, according to a former PA security official and an analyst.
Tubas Governor Ahmed al-Asaad said the PA had decided to strike with "an iron fist" against what he described as lawlessness and anarchy.
Two PA security men have been wounded as their forces fought members of the "Tubas Battalion", an armed group dominated by the Islamic Jihad faction, and detained at least three of its members, including its leader.
Standoff
Al-Asaad said the PA was responding to public concern, giving the example of a bomb that had been recently planted near a school - apparently in preparation for an attack on Israeli forces.
"We don't want - under the slogan of resistance or any other slogan - to destroy our country and to destroy Tubas," he said.
"Our approach is clear and is the approach of the President: the approach of peaceful, popular resistance and safeguarding security and order," he told Reuters in an interview.
The Authority has overhauled its operations in a variety of areas, assuaging some of the concern expressed by countries that provide aid.
"On the whole, the revitalisation effort has been pretty well received," a European diplomat said.
On Saturday, dozens of PA security men surrounded a building near Tubas where two Batalion militants were holed up, with one of them, Obada al-Masri, threatening to blow himself up, a source familiar with the incident said.
"We negotiated with him for almost five hours," said his father, Abdel Majid al-Masri, who was called to the scene to help convince his son to surrender.
He said his son eventually agreed after receiving guarantees he would be held in Tubas rather than at another PA jail where he was previously incarcerated and had suffered mistreatment.
Masri expressed relief that his son had been taken into PA custody rather than killed by Israeli forces, which have also been raiding Tubas in search of militants and had previously jailed his son for three years.
His son had chosen "the route of struggle to liberate Palestine", he said, rejecting PA accusations that Battalion members were engaged in lawlessness.
Islamic Jihad condemned the operation, saying PA forces appeared to be aiming to eliminate resistance to Israel and their methods were no different.
Low-hanging fruit
PA security forces were heavily deployed, with a checkpoint on a road into the city, when Reuters visited Tubas this week, but the city was calm.
Ghaith al-Omari, an expert on PA affairs at the Washington Institute for Near East Policy, said the Tubas campaign was a much-needed attempt by the PA to assert itself in a part of the West Bank where its control had been "practically absent".
"The PA understands that nobody sees it as being capable of running Gaza and everyone cites the fact that they can't even run the northern West Bank," said Omari, formerly an advisor to the Palestinian president.
But he said one operation did not make a reputation, noting that Tubas represented "low-hanging fruit" and militant groups there were weaker than in Jenin, also in the north.
With U.S. support, the 35,000-strong PA security forces were reconstituted after the 2007 Hamas takeover of Gaza.
Yet the Washington institute said in a July policy note that for PA to assume governance in Gaza it would need extensive recruitment, equipment, vetting, and training, a process it said would take years.
In the West Bank, the biggest issue for Omari was that PA security forces were "really, really unpopular in the north".
A September opinion poll showed 89% of Palestinians in the West Bank want Abbas to resign, and that Hamas has more support than Fatah there. Polls by the Palestinian Center for Policy and Survey Research have consistently shown that Marwan Barghouti, a Fatah leader jailed by Israel, would win any presidential vote.
Omari said: "To do effective security you need both capabilities but also you need credibility and legitimacy."