The ruling Fatah Party canceled its primary in Gaza at the end of a full day of voting Monday after gunmen disrupted at least a dozen polling places, firing in the air and stealing some ballot boxes.

The violence underscored Palestinian leader Mahmoud Abbas' inability to maintain order in the Gaza Strip, or even in his own party, as Fatah tries to fight off a strong challenge from the Islamic Hamas group in the Jan. 25 parliamentary elections.

The vote Monday was part of the first-ever primary held by Fatah, a democratic reform considered crucial to removing the taint of corruption from the party. Many young Fatah activists, long frozen out of power by entrenched party leaders, have insisted that transparent primaries — rather than secret back-room negotiations — determine the party's legislative slate.

Even before the voting began Monday, problems emerged. Technical glitches forced voting in the southern Gaza town of Rafah and areas of central Gaza to be postponed until Wednesday, Fatah officials said.

At some of the roughly 190 Fatah polling stations that did open across Gaza, many voters found their names were not on registration lists or that they had been mistakenly registered at the wrong station. Fatah officials said it was their first experience holding a primary and that they had only a short amount of time to compile lists of the 200,000 eligible voters in Gaza.

Some militants lost patience.

In one station in a village in eastern Khan Younis, a group of about 15 Fatah gunmen, angry at not finding their names on the list, began shooting in the air, witnesses said. Officials then closed the polling place for about 45 minutes. Polling stations in the towns of Beit Hanoun and Deir el-Balah were also closed after similar incidents.

Elsewhere, Fatah gunmen barged into a polling station in the Sheik Radwan neighborhood of Gaza City, took its 16 ballot boxes into a yard, poured gasoline over several of them and set them on fire, witnesses said.

At least a dozen polling stations were closed because of problems with gunmen.

Fatah officials held an emergency meeting Monday afternoon and decided to cancel the primary, nullifying the votes already cast, according to a party statement.

The primary would have to be rescheduled, possibly for Friday, Fatah spokesman Deab Allouh said, adding that the party's candidates would have to be chosen by Dec. 3. It was unclear how officials could ensure that a new round of voting would go any smoother.

Abbas has had trouble bringing order to the Gaza Strip since Israel withdrew from the territory in September.

A longtime Fatah leader in Gaza, Abdel Aziz Shahin, called on the Fatah Central Committee to take responsibility for the voting chaos and resign. "Fatah is like a dinosaur, and the head of this dinosaur is not aware of the rest of the body," he said.

Hassan al-Kashef, a political columnist with the Palestinian Al Hayat Jedideh newspaper, blamed Fatah for Monday's violence, which he described as "a shock and a wake-up call" that could have damaging consequences for the party.

"The attitude of Fatah in dealing with differences is to find solutions that only go halfway, cosmetic solutions that are not real," he said. "The leadership should be strong enough to offer real protection to the candidates and to the election process."

The Gaza primaries had been expected to continue the trend from earlier voting in several West Bank districts that swept away many Fatah old-timers, who controlled the party for decades and were seen as corrupt, replacing them with younger, more popular politicians.

The housecleaning is crucial to Fatah's campaign to beat back the strong challenge from Hamas, which has wooed Palestinians in part with its image of honesty.

Before the cancellation, Mohammed Dahlan, a Gaza strongman and top Palestinian official who is seen as a bridge between the two generations in Fatah, was greeted by scores of chanting supporters as he voted in a sports club in the Khan Younis refugee camp, where he is running for a place on the ballot.

"The election has brought a clear and obvious answer that the leadership has to be changed," said Dahlan, who grew up in the camp. "We need an internal, positive revolution within Fatah that can guarantee the dignity of our old-timers — our leaders — and the continuation of Fatah."

Several voters said the primary would give a voice to grass-roots party members and allow younger activists a chance to break into Fatah's higher ranks.

"We want new blood in Fatah's body. We want to say that Fatah is able to lead and to bring us our rights," said Majdi Abu Daka, a 34-year-old engineer. "We respect the old generation, but it's time to give us a chance. The world is changing and so are we."

After nightfall Monday, Israel fired artillery shells at fields inside Gaza after Palestinian militants aimed a mortar and a rocket at Israeli villages just outside the territory, the military said.

No casualties were reported from either the Palestinian attack or the Israeli retaliation.