GAZA CITY (AP) – Gaza militants fired a barrage of rockets into Israel on Thursday, hours after a cease-fire was declared to end two days of intense fighting between Israel and the Islamic Jihad group, the heaviest escalation in months that killed at least 34 Palestinians, including three women and eight children, and paralyzed parts of Israel.

No one immediately claimed responsibility for the new wave of rockets and it wasn’t clear how this would affect the fate of the cease-fire.

Israel had hailed the Gaza operation as a victory, defending its policy of targeting militants in their homes despite civilian deaths and vowed to continue the tactic. Islamic Jihad said it had succeeded in getting Israel to agree to a cease-fire based on several demands, including a halt to Israeli targeted killings of the group’s leaders.

Islamic Jihad spokesman Musab al-Berim said the Egyptian-brokered deal went into effect at 5:30 a.m. An Israeli military spokesman tweeted that the Gaza operation “is over.” Some restrictions were lifted on residents of southern Israel and traffic returned to the streets of the Palestinian coastal territory.

But after hours of calm, a barrage of rockets blasted out of the territory, setting off air raid sirens in southern Israel and testing the fragile truce.

The fighting first erupted early on Tuesday after Israel killed a senior commander of the Iranian-backed militant group who was said to be behind a string of rocket attacks and who Israel said was believed to be planning a cross-border infiltration.

The rare targeted killing by Israel sparked the heaviest fighting with Gaza militants since May. Islamic Jihad fired some 450 rockets toward Israel, while Israel responded with scores of airstrikes.

Gaza’s ruling Hamas militant group, much larger and more powerful than Islamic Jihad, stayed out of the latest escalation — an indication it would be brief.

Israel typically does not publicly acknowledge deals with militant groups, and on Thursday officials said the only unwritten agreement was that Israel would hold fire so long as Islamic Jihad did. Military spokesmen listed a series of accomplishments after the two-day spasm of violence, including the killing of some 25 militants in targeted strikes.

Israeli Foreign Minister Israel Katz said the policy had “proved itself” and would continue. “Everyone who was a top military official, who was set to carry out and was involved in terror or rocket firing against Israel was eliminated,” he told Israeli Army Radio. “And we intend to continue with this.”

Israeli Defense Minister Naftali Bennett warned Gaza militants they were not safe anywhere. “A terrorist who tries to harm Israeli citizens will not be able to sleep soundly, not in his home and not in his bed and not in any hiding place,” he said.

Critics of Israel’s contentious policy say it amounts to extrajudicial killings that endanger civilians.

But Israeli military spokesman Lt. Col. Jonathan Conricus defended the attacks on militants’ private homes, saying Islamic Jihad commanders used their residences to store weapons, making them legitimate targets.

Palestinian officials say 34 people were killed in the fighting, including at least 18 militants. They say eight children, including a pair of 7-year-olds, and three women were among the dead.

The rocket fire crippled life across southern Israel and on Tuesday, also in the country’s heartland in and around Tel Aviv, as nonstop air-raid sirens canceled schools and forced people indoors. At least three people were lightly wounded from shrapnel or shattered glass. Most rockets landed in open areas or were shot down by Israel’s Iron Dome missile defense system.

Much of Gaza resembled a ghost-town, with almost no vehicles on the roads except for ambulances evacuating the wounded.

Al-Berim, the Islamic Jihad spokesman, lauded the group’s efforts against Israel, saying it “had its word, confronted the aggression,” and “defended the Palestinian people.”

Shortly after al-Berim’s cease-fire announcement, two rockets were fired out of Gaza, setting off sirens in southern Israel. It was not immediately clear whether the launches were intentional or misfires caused by electronic timers. Israel didn’t respond.

Islamic Jihad said the fire was likely because word hadn’t spread to all members about the halt to violence.

The Israeli military’s Home Front command tweeted that it was lifting restrictions in certain areas but leaving them in place in the areas surrounding Gaza.

In Gaza, cars could be heard back on the streets as the territory appeared to be springing back to life. Israeli military drones still buzzed overhead.

U.N. and Islamic Jihad officials were in touch Wednesday with Egyptian mediators, who typically broker agreements to end fighting in Gaza, and

Late Wednesday, Islamic Jihad’s leader, Ziad al-Nakhalah, announced three conditions for an end to the fighting: an end to targeted killings, a halt in Israeli shootings of protesters at weekly demonstrations along the Israeli border and easing a 12-year-old Israeli blockade that has devastated Gaza’s economy.

Israel imposed the blockade after Hamas violently seized control of Gaza in 2007 from the internationally backed Palestinian Authority. Israel considers Hamas and Islamic Jihad, which both seek its destruction, to be terrorist groups.

The killing of Islamic Jihad’s Bahaa Abu el-Atta on Tuesday coincided with a strike in the Syrian capital of Damascus that targeted another Islamic Jihad commander. Israel hasn’t claimed responsibility for that attack and the commander was not killed, but the strikes stepped up Israel’s regional conflict with Iran and its proxies.

Israel often strikes Iranian interests in Syria and the fresh fighting looked to awaken Israel’s increasingly open conflict with Iran and its proxies in the region.

Iran supplies Islamic Jihad with training, expertise and money. Although its base is Gaza, Islamic Jihad also has some of its leadership in Beirut and in Damascus, where it maintains close ties with Iranian officials.

As Iran’s proxy in Gaza, the group is key to Tehran’s strategy of keeping pressure on Israel on all fronts.

Iran has forces based in Syria, Israel’s northern neighbor, and supports Hezbollah militants in Lebanon. Hamas also receives some support from Iran.

The violence came at a touchy time in Israel, where Prime Minister Benjamin Netanyahu heads a caretaker government after two elections ended inconclusively and after he failed twice to form a governing coalition.

His main rival, former army chief Benny Gantz, is now trying to cobble together a government, but his chances appear slim. If he fails by next week, Israel could be on its way to an unprecedented third election in less than a year.

Lawmakers from across the political spectrum typically rally behind the government during a military operation, and Netanyahu has briefed Gantz before and during the violence, setting off speculation the conflagration may succeed to push the men toward an agreement.

The escalation also comes ahead of an expected indictment against Netanyahu for a number of corruption allegations.

During the months of election campaigning, the long-serving Israeli leader has sought to depict himself as the only leader capable of steering Israel through its myriad security challenges, painting Gantz as weak despite his military bona fides.

With the legal woes hovering, the latest round of violence could help to bolster Netanyahu’s image.