Gunmen opened fire Friday at the convoy of Palestinian Prime Minister Ismail Haniyeh of Hamas as it passed through a refugee camp in central Gaza, witnesses said.

A Hamas spokesman said an exchange of fire took place in an area that Haniyehwas visiting, but the convoy was not directly targeted.

The attack destroyed one vehicle, but no one was injured. It came just hours after Hamas and the rival Fatah movement reached a deal to end fighting between the two factions.

Under the deal, which was brokered by Egyptian mediators in Gaza, the groups agreed to refrain from acts that raised tensions and committed themselves to dialogue to resolve differences.

Abbas threatens cabinet dismissal

Earlier Friday, Haniyeh brushed off comments by President Mahmoud Abbas, head of Fatah, who indicated he could dismiss the Hamas-led cabinet.

Abbas said he was considering the move to try to get crippling Western sanctions lifted that have caused widespread duress in the Palestinian territories.

Tensions between the two factions have been steadily rising since Hamas defeated the long-ruling Fatah party in parliamentary elections early this year.

Hamas has rejected international calls to renounce violence and recognize Israel's right to exist.

Abbas has been urging the group to accept the demands, but so far has been unsuccessful.

Rally for Jerusalem

The attack came on the same day as various rallies were held in the Gaza Strip to mark the international day of Jerusalem, or "Al-Quds Day," the Arabic name for Jerusalem.

Tens of thousands of Hamas supporters gathered in the city of Khan Younis for the event, including Palestinian Foreign Minister Mahmoud Zahar, a top Hamas leader in Gaza.

Itis traditionally a day of protest to show the importance of Jerusalem to Muslims.

The day is marked by Muslims all over the world in support of the Palestinians and is traditionally held on the last Friday of the holy month of Ramadan.

Jerusalem is the third holiest site in Islam after the Saudi Arabian cities of Mecca and Medina.

With files from the Associated Press