An explosion caused by Israeli airstrikes is seen in Gaza City.

GAZA CITY, Gaza Strip — The Islamic Jihad militant group early Thursday announced a cease-fire ending two days of heavy fighting with Israel.

Spokesman Musab al-Berim said the Egyptian-brokered deal went into effect at 530 a.m.

He said the cease-fire was based on a list of demands presented by his group late Wednesday, including a halt to Israeli targeted killings of the group’s leaders. The fighting broke out early Tuesday after Israel killed a senior commander of the militant group.

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

Palestinian officials reported 32 deaths, including a 7-year-old boy and six members of a single family.

There was no immediate comment from Israel, which rarely acknowledges unofficial deals with militant groups.

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

The fighting erupted early Tuesday after Israel killed a senior commander in the Islamic Jihad militant group, along with his wife, as they slept in their Gaza home. Israeli officials say Bahaa Abu el-Atta was responsible for numerous rocket attacks and was plotting a large-scale border infiltration.

Islamic Jihad, an Iranian-backed militant group sworn to Israel’s destruction, responded by launching dozens of rockets toward Israel, some reaching as far as Tel Aviv, prompting Israel to carry out scores of airstrikes.

The rocket fire brought much of Israel to a standstill. Schools closed throughout southern Israel, people stayed home from work and large public gatherings were banned. Air raid sirens wailed during the day and into the evening. By Wednesday night, the army said 360 rockets had been fired at Israel.

In Gaza, schools and public institutions also were closed for a second day and there were few cars on the streets, with people mostly staying indoors. After nightfall, Gaza City resembled a ghost town, with streets empty and the whooshing sounds of outgoing rockets and explosions of Israeli airstrikes heard. Virtually the only vehicles on the roads were wailing ambulances.