Dressed in riot gear, the Fatah-dominated forces used clubs and rifle-butts to beat back the Hamas demonstrators before shooting broke out.
The mosque was damaged.
Meanwhile, Khalil al-Hayya, the head of Hamas’s faction in parliament, told 100,000 of the movement’s supporters in Gaza City: “What a war Mahmoud Abbas you are launching, first against God, and then against Hamas.”
Ismail Haniya, the prime minister and leader of Hamas, was more conciliatory at the rally, appealing for “national unity”, but stopping short of explicitly calling for calm as he had during previous spikes in internal fighting.
Tensions were at their highest in a decade and followed months of failed talks to form a unity government between the ruling Hamas Islamist faction and Abbas’s once dominant Fatah.
Hayya said Hamas would not agree to holding an early election or a referendum on the issue, a move that Abbas could announce in a speech planned for Saturday in an attempt to break the political deadlock.
The Palestinian president is expected to give a major speech around midday (1000 GMT) in Ramallah.
Al Jazeera has learnt that Abbas may seek expert opinion on the legality of calling early election.
Hayya did not say what Hamas would do if Abbas made such a dramatic announcement.
“He is leaning towards calling for early elections,” Saeb Erekat, a senior aide to Abbas, told Reuters.
“The president’s choice is between bullets and ballots. He will choose ballots. Ballots are the only way to avoid the prospect of a civil war.”
Some analysts question whether Abbas will make such a bold announcement with emotions running at fever pitch.
Ismail Rudwan, a Hamas spokesman, accused Mohammed Dahlan, a Fatah regional commander and legislator, of being behind the attack on Haniya’s convoy in Rafah on Thursday.
Dahlan rejected the allegation. He said it was part of a Hamas “cover-up” after unidentified fighters this week shot dead three young sons of an intelligence official loyal to Abbas outside their school.
Haniya has condemned the killings and the government said on Friday it would investigate the incident.
Erekat, at a news conference, strongly condemned the accusation against Dahlan, saying it amounted to an official sanction for the Fatah politician’s assassination.