Palestinian rivals Hamas and Fatah are gearing up for their first contest at the polls since 2006 — a vote for mayors and local councils in 425 communities in the West Bank and Gaza Strip.

Each side hopes the election will give it a foothold in what has been the other's exclusive territory since mutual purges in 2007. At the time, the Islamic militant group Hamas seized Gaza, driving out Fatah, while Fatah's leader, Palestinian President Mahmoud Abbas, cracked down on Hamas in the autonomous areas of the Israeli-occupied West Bank.

The Oct. 8 ballot might not allow either side to proclaim victory. Popular independents are part of the candidate mix, tribal loyalties often trump factional allegiances at the local level and Hamas activists can't run openly in the West Bank for fear of arrest by Israel.

But the election provides at least an indication of the popularity of Hamas and Fatah, after the foes shunned competitive elections over the past decade.

"Despite the fact that it (the election) is about services and municipal work, it's purely political," said senior Fatah figure Nabil Shaath. "There's nothing in Palestine that isn't political."

The last municipal elections were held in 2012, but only in parts of the West Bank, and Hamas didn't compete because it couldn't agree with Abbas on procedure. When Abbas decided earlier this year to call for local elections in 2016, as scheduled, he likely expected Hamas to stay out of the race again, analysts said.

But Hamas unexpectedly accepted the challenge. This forced a trade-off in which each side grudgingly acknowledged some of the other's authority.

Hamas recognized Abbas' general election commission as final arbiter, while Abbas agreed that Hamas institutions would supervise the vote in Gaza.

"There is some kind of normalization taking place in this election," said Ghassan Khatib, a former spokesman of the West Bank-based autonomy government.

It's not clear if the municipal vote could help pave the way for long-overdue presidential and parliamentary elections, which are seen as key to ending the Palestinian territorial split. The divide is one of the obstacles to independence, along with the years-long paralysis in negotiations with Israel.

The Western-backed Abbas was elected to a four-year term as president in 2005, while Hamas defeated Fatah in 2006 parliament elections, creating a political stalemate that eventually led to Hamas' Gaza takeover and a West Bank crackdown on the Islamic militants.

Since then, the rivals have preferred to tighten control over their respective territories, and repeated reconciliation attempts have failed.

The split has been unpopular with Palestinians. Recent polls have indicated that two-thirds of Palestinians want Abbas to resign, and nearly one half of Gaza residents want to emigrate.

In this climate, the local elections are seen as a relatively low-risk move by both camps to restore some legitimacy.

In the Gaza Strip, Fatah- and Hamas-backed lists of candidates are competing for seats on 25 municipal councils. Any renewed Fatah representation in Gaza local councils would be seen as an achievement by the brow-beaten faction.

Fayez Abu Aita, a Fatah spokesman in Gaza, said he hopes the vote will lead to general elections. "We think this will be a step toward ending the split," he said.

In the West Bank, Hamas has kept a low profile since 2007 to minimize the risk of arrests of activists by Israel or Abbas' autonomy government, which cooperated in the clampdown. Over the years, dozens of Hamas officials, including legislators and mayors elected in 2005, have spent time in Israeli and Palestinian prisons.

In the October vote, Hamas is competing indirectly in the West Bank by backing nominally independent Islamists or forging alliances with other factions, including Fatah.

One such alliance emerged in Nablus, the West Bank's second largest city. It is headed by popular former Mayor Adli Yaish, an Islamist and philanthropist.

In an interview at his Mercedes dealership last week, the 63-year-old British-educated engineer said he faced difficulties in his first term in city hall, after Islamists swept the 2005 local election in Nablus.

Some foreign donors refused to deal with him and the Islamist-dominated city council because of their ties to the Muslim Brotherhood, the regional parent movement of Hamas.

This time, he asked activists from other factions, including Fatah, to join his list.

"Some in Hamas are against this. They say, 'You are an Islamist and you can win easily.' But I am telling them we need unity," said Yaish. "The split has harmed our life and it's time to try to end it gradually, from the bottom up."

In some other West Bank communities, Fatah- and Hamas-endorsed lists compete directly with each other.

In the towns of Ramallah and Bethlehem, which have relative large Christian minorities, Abbas has decreed that a Christian be guaranteed the job as mayor, traditionally presiding over coalitions with other factions.

Ghazi Hamad, a senior Hamas figure in Gaza, said his movement won't be able to win outright in the West Bank because of the restrictions, but hopes to see at least some of its sympathizers elected to the local councils.

Elections appear to be on track after the registration of candidates last week, but there's still a chance of cancellation if either side starts to harass or arrest rivals.

Analyst Hani al-Masri said that for now it's in the interest of both sides to go ahead with the local ballot because it might help defuse demands for choosing a new president and parliament.

"This election is meant to avoid the national election," he said.

__

Laub reported from Amman, Jordan.