Updated

Hamas and Fatah gunmen battled each other across the Gaza Strip early Monday, attacking security compounds, knocking out an electrical transformer and kidnapping several local commanders in some of the most extensive factional fighting in recent weeks.

Two people were killed and large parts of Gaza City were plunged into darkness.

Saudi Arabia and Egypt offered to mediate, as Information Minister Youssef Rizka of Hamas warned that the two sides are close to civil war. Saudi Arabia's King Abdullah said the infighting, which has claimed more than 60 lives since December, was shameful, and offered to host talks in the holy city of Mecca. Hamas and Abbas welcomed the idea, but no date was set yet.

• Visit FOXNews.com's Mideast Center for more in-depth coverage.

The fighting erupted in Gaza after the collapse of coalition talks between Hamas, which controls parliament and the government, and moderate President Mahmoud Abbas, who heads Fatah. Abbas has threatened to call early elections, a step Hamas has denounced as a coup attempt.

The violence in Gaza often appears random, but some patterns are emerging, particularly in the latest round, which began Thursday and has so far claimed 30 lives.

Hamas has repeatedly targeted police compounds in recent days in an apparent effort to seize control of the Abbas-allied security forces. Hamas gunmen have also kidnapped several senior security commanders loyal to Abbas, but have released them.

Fatah gunmen, in turn, were drawing out Hamas fighters across the Gaza Strip, in what appeared to be a "war of attrition." From Sunday afternoon to daybreak Monday, gun battles raged in the southern town of Khan Younis, in Gaza City and in the north of the coastal strip.

Some of the most intense fighting took place outside the Gaza City headquarters of the Preventive Security Service, which a decade ago had led a crackdown on Hamas and is fiercely loyal to Abbas. Hamas gunmen fired dozens of mortar shells at the compound, drawing return fire through the night.

The compound is located in a heavily populated area, surrounded by apartment highrises, and frightened residents tried to stay away from their windows to avoid getting hit by stray bullets.

They also had to do without electricity -- the western side of Gaza City was plunged into darkness after gunmen knocked out the local transformer.

Elsewhere in Gaza City, Hamas gunmen kidnapped the teen-age son and nephew of Col. Khamis al-Ajous, head of Preventive Security in Gaza City, on Sunday. The kidnappers threatened to kill the two boys within three hours unless Hamas fighters seized by Fatah-allied security forces were released. By Monday morning, the boys had still not been released.

In the southern town of Khan Younis, fighting erupted after a local security chief was kidnapped by Hamas gunmen Sunday. In retaliation, Fatah fighters seized several local Hamas leaders. Three people were killed in the fighting Sunday, and shooting continued in the town until early Monday.

Two more Hamas gunmen were killed overnight, according to hospital officials.

Hamas and Fatah also set up more roadblocks around homes and offices of their leaders, and near security compounds. In Gaza City, masked Fatah loyalists armed with machine guns and grenades took up positions outside the national security headquarters, shining flashlights at approaching cars.

Hamas gunmen deployed outside the home of Interior Minister Said Siyam, the top commander of Hamas forces. Fatah alleged Hamas was planting roadside bombs near the house to keep away Abbas loyalists.

After several weeks of clashes, no clear winner is emerging from the fighting, a sign that neither is strong enough to knock the other out. The bitter rivals have been buying, smuggling and building weapons for months trying to gain an edge, but they have held back from all-out battle and find themselves in a stalemate.

Each side can count on thousands of armed men. Most members of the Palestinian security forces are loyal to Abbas, while Hamas last year set up its own 5,600-man militia, the Executive Force. Each also has a military wing -- Fatah's Al Aqsa Martyrs' Brigades and Hamas' Izzedine Al Qassam Brigades.

Hamas is getting funds from Iran and other Islamic supporters worldwide, while the Bush administration has asked Congress to approve $85 million (euro66 million) in aid for Abbas' troops.

Both sides began preparing for the possibility of a big battle after Israel left the Gaza Strip in September 2005 and the arms race intensified after Hamas won legislative elections a year ago.

Rifles, missiles, ammunition and explosives have been pouring into Gaza through tunnels under the border with Egypt, reaching both Hamas and Fatah, security officials and weapons dealers say.

Complete coverage is available in FOXNews.com's Mideast Center.