An Egyptian-brokered truce failed to take effect as planned on Sunday to halt a flare-up of violence between Israel and Gaza militants in which nine Palestinian gunmen and an Israeli civilian have been killed, an Israeli military official said.

Three rockets were fired at Israel after the 6 a.m. (4 a.m. British time) deadline for the truce, the official said. Two were intercepted by Israel's Iron Dome missile shield and another slammed into southern Israel causing no casualties or damage.

After weeks of a relative lull surrounding a prisoner swap this month between Israel and the Islamist Hamas rulers of Gaza, violence erupted anew on Saturday.

The Israeli air force attacked a base of the Islamic Jihad group, killing five top militants, in retaliation for what Israeli officials said were Gaza-based rocket attacks on the Jewish state. Four other militants died in subsequent raids.

One of some 30 rockets and mortar bombs fired at Israel killed an Israeli man in the city of Ashkelon. Two other people were wounded.

Israel kept schools shut in its southern region on Sunday as a precaution against further rocket fire, while hundreds of thousands of civilians within 40 km (25 miles) of Gaza were urged to stay indoors.

Egyptian officials said earlier that Cairo, which mediated the prisoner exchange, had secured a truce between Israel and the militants in Gaza.

Islamic Jihad -- a sometime Hamas ally that has recently chafed at its rule of Gaza -- said a commander, Ahmed al-Sheikh Khalil, and four comrades who had overseen production of bombs and rockets were killed in Saturday's Israeli strike on the base. Two other fighters were wounded.

Islamic Jihad vowed revenge, a call echoed by smaller groups in the coastal territory.

There is no chance of speaking about a truce now, following such a big crime against leaders of the group, Islamic Jihad spokesman Abu Ahmed said on Saturday.

Islamic Jihad and two more secular factions, the Popular Front for the Liberation of Palestine and al-Aqsa Martyrs Brigades, claimed responsibility for most of Saturday's rocket fire.

Israel demanded international intervention to stop the Palestinian attacks.

We seek no confrontation with the Palestinians and do not want to inflame the situation, but we will not absorb shelling after shelling without a response, Foreign Minister Avigdor Lieberman said, threatening unspecified consequences.

Hamas last week repatriated an Israeli soldier it seized in 2006 in exchange for the release of more than 1,000 jailed Palestinians. There were no claims of any Hamas involvement in Saturday's violence, but officials expressed anger

Commenting on the Islamic Jihad deaths, Hamas spokesman Sami Abu Zuhri accused Israel of a serious escalation against our people.

Islamic Jihad released images of what it said was the firing by its men of a truck-mounted multiple rocket-launcher, a platform not previously seen in Gaza.

Israel says Gaza arsenals have been boosted by gun-running from Libya since the fall of its ruler, Muammar Gaddafi.

(Writing by Allyn Fisher-Ilan Dan Williams; Editing by Ralph Gowling)