The Palestinian Hamas group has accused a key figure in the rival Fatah faction of trying to assassinate Prime Minister Ismail Haniya as he returned to Gaza.
Hamas accused Mohammad Dahlan of orchestrating the attack as Mr Haniya crossed Gaza's border with Egypt.
Clashes have now broken out between Hamas and Fatah supporters in Gaza City and the West Bank town of Ramallah.
A bodyguard died and Mr Haniya's son was among five hurt in the gun battle late on Thursday at the Rafah border.
Mr Dahlan has rejected Hamas's accusations of involvement, saying that Hamas, the governing party, was trying to "mask its failures".
Correspondents say the attack on Mr Haniya - and Hamas's open accusation of such a prominent opponent - have dramatically raised the stakes in the tense political struggle in the Palestinian territories.
Shooting erupted in Gaza City on Friday between masked Hamas gunmen and Palestinian police allied to Fatah. An exchange of gunfire between the factions was also reported in Ramallah.
Hamas had deployed armed militants to key points in a show of force following the fire fight.
Hamas spokesman Ismail Radwan had earlier said the attack at Rafah was "an assassination attempt carried out by traitors led by Mohammad Dahlan".
Mr Dahlan is a former minister of internal security and a fierce critic of Hamas.
In the 1990s he led a crackdown on militants who refused to acknowledge the new Palestinian Authority (PA).
Fatah spokesman Tawfiq Abu Khoussa rejected Hamas's claims.
"Fatah has condemned the incident and is demanding the formation of an official investigation committee," he said.
"These accusations are posing a grave threat to Palestinian unity."
PA President Mahmoud Abbas, the head of Fatah, said he regretted the attack, but Hamas said he had to share some responsibility.
Mr Haniya, after his return to Gaza City, said: "We know who opened fire."
Israeli Deputy Defence Minister Ephraim Sneh said his first response was to regret that the gunmen had missed Mr Haniya.
He told Israeli radio: "Emotionally, it was indeed my feeling. But upon coldly reconsidering it, I do not believe that that would have solved the problem."
Inter-faction tensions have increased since the killing of three sons of a pro-Fatah security chief on Monday.
Mr Haniya had tried to cut short his first trip abroad as prime minister to deal with the crisis.
But Israel on Thursday closed the Gaza border, saying the reported $30m (£15.3m) Mr Haniya was carrying in donations as he returned from his foreign trip would fund "terrorist operations".
Mr Haniya crossed late in the evening following hours of intense negotiations, leaving the money on the Egyptian side. But at the border, guards allied to Fatah exchanged fire with Mr Haniya's security forces.
The BBC's Alan Johnston in Gaza said that during chaotic scenes gunfire rattled around the entrance hall to the customs hall as Mr Haniya's bodyguards shielded him.
Television pictures showed Mr Haniya's jeep manoeuvring to avoid bullets.
Hamas won elections in January, but has struggled in government amid a Western aid boycott against the militant Islamic group, which refuses to renounce violence and recognise Israel.
The Palestinian Authority has been unable to pay full salaries to its 165,000 workers.