GAZA CITY, Gaza Strip - Gunfire and explosions raged across Gaza City yesterday, killing at least 21 people in the most widespread fighting of nearly a year of clashes between the rival Fatah and Hamas movements.

Street battles turned the densely populated seaside city into a war zone, putting terrified civilians increasingly at risk. Stray bullets damaged apartment buildings, gunmen fired at a group of protesters, and Hamas gunmen beat a Fatah lawmaker and her two children before setting fire to their apartment.

Hamas also targeted Israel, firing barrages of homemade rockets for a second day, seriously wounding one person and knocking out power in the southern Israeli town of Sderot, officials said. Israel staged two air strikes on Hamas targets, reportedly killing five people.

Hamas fighters appeared to be trying to draw Israel into the conflict in hopes of uniting Palestinians against a common foe. Israeli Prime Minister Ehud Olmert's Security Cabinet decided against large-scale reprisal, though it authorized the army to step up attacks on Hamas rocket squads.

"Israel cannot continue to restrain itself when its citizens are being hit and, therefore, decided on a severe and serious response," Olmert's office said.

The Palestinian infighting threatened to destroy the fragile unity government established in March by Hamas and Fatah and pushed the rivals ever closer to all-out civil war.

A main goal of the alliance was to halt months of factional violence, but the unity deal never addressed a key area of dispute - control over Palestinian security forces.

The latest round of violence erupted this week after Palestinian Authority President Mahmoud Abbas of Fatah deployed thousands of police to halt a crime wave in Gaza without consulting with Hamas. Forty-five people have died, most of them Fatah men, and dozens have been wounded.

Screaming for help

During the week, the attacks have grown increasingly brazen. Hamas gunmen fatally shot six bodyguards yesterday during an assassination attempt on a top Fatah security man. The commander, Rashid Abu Shbak, was not home during the assault, and his family escaped harm.

Hamas militiamen also set fire to an 11-story apartment building inhabited by several Fatah officials. Fatah lawmaker Nema Sheik Ali, the wife of a top security commander, said the gunmen broke into her fifth-floor flat, beat her and two of her children with their weapons, then set the home ablaze.

Ali's family managed to flee the building. But many others were trapped inside, screaming out their windows for help.

Resident Shadi al-Kashir said his father, wife, five children and two sisters were stuck for a time in their apartment, trapped by thick smoke in the halls and terrified of gunmen at the building's entrance and on its roof. "They tried to send ambulances, but the ambulances came under fire," he said.

Eventually, the fire was put out, and the gunmen withdrew, security officials said. Medical officials said nine people were treated for smoke inhalation.

'What is happening ...'

The streets of central Gaza City echoed with the rattle of gunfire and were empty except for gunmen in black ski masks. Frightened residents huddled in darkened homes after electricity to some neighborhoods was cut off by a downed power line. Buildings were pocked with bullet holes, and windows were shattered by explosions.

"What is happening in Gaza endangers not only the unity government, but the Palestinian social fabric, the Palestinian cause, and the Palestinian strategy as a whole," said Saeb Erekat, a top aide to Abbas.

Hamas official Ahmed Bahar, the deputy parliament speaker, called the fighting a major setback. "We urge all the Palestinian parties to stop," he told Al-Jazeera television. "We urge them to direct our weapons to the Israeli enemy instead."

At nightfall, Hamas said it would observe a unilateral cease-fire, and Abbas called on the warring parties to hold their fire. The United States, European Union, United Nations and Arab League also urged a halt in fighting. But battles raged into the evening, killing two Hamas fighters and a Fatah gunman.

Abbas planned to travel from the West Bank to Gaza today to meet with Palestinian Prime Minister Ismail Haniyeh of Hamas, a presidential aide, Yasser Abed Rabbo, said.

One option for Abbas was to declare a state of emergency, which would let him set up a small "emergency" government that could make decisions without parliament's approval and could authorize a large deployment of security forces, the aide said. But carrying out such a deployment would be extremely difficult, and Hamas said it would oppose an emergency government.