GAZA CITY, Gaza Strip — Palestinian militants bombarded Israel with dozens of rockets and mortar shells Monday, while Israeli warplanes struck targets throughout the Gaza Strip in what appeared to be the most intense exchange of fire since a 2014 war.

Palestinian officials said at least three people, including two militants, were killed by Israeli fire and nine were wounded, and an Israeli airstrike destroyed the ruling Hamas group’s TV station. In Israel, the national rescue service said at least 20 people were wounded, including a 19-year-old soldier and a 60-year-old woman who were in critical condition.

The fighting cast doubt over recent understandings brokered by Egypt and U.N. officials to reduce tensions. Just a day earlier, Israel’s prime minister had defended those understandings, saying he was doing everything possible to avoid another war.

The U.N. said it was working with Egypt to broker a halt in the violence. “Rockets must STOP, restraint must be shown by all!” the U.N. Mideast envoy’s office tweeted.

The rocket fire was triggered by a botched Israeli military raid in Gaza on Sunday. Undercover troops, apparently on a reconnaissance mission, were discovered inside Gaza on Sunday, setting off a battle that left seven militants, including a Hamas commander, and an Israeli military officer dead.

Around sundown on Monday, militants launched some 100 rockets in less than an hour, the most intense barrage since the 50-day war four years ago. The outgoing rockets, which continued into the evening, lit up the skies of Gaza and set off air raid sirens throughout southern Israel.

The military said warplanes, helicopters and tanks had struck over 30 militant targets, including military compounds, observation posts and weapons facilities. It also said it targeted a squad that was launching rockets.

Lt. Col. Jonathan Conricus, a military spokesman, said the army had sent additional infantry troops, rocket defense systems and intelligence units to the Gaza frontier.

Late Monday, an airstrike destroyed the Gaza City headquarters of Hamas’ Al Aqsa TV station. Israel had fired warning shots ahead of the airstrike, prompting the station to halt programming and replace it with a logo. Minutes later, the airstrike flattened the three-story building and the station went black.

Workers had evacuated the building after the warning shots, and there were no immediate reports of casualties.

Hamas spokesman Fawzi Barhoum condemned the bombing as “a barbaric, brazen aggression.” Ten minutes later, the station resumed broadcasts, airing prerecorded national songs.

Israel said the station “broadcasts violent propaganda” and provides “operational messaging” to militants. A second airstrike destroyed a five-story office building that housed Hamas media offices. The strike also followed warning shots, and there were no reports of casualties.

Hamas and the smaller militant group Islamic Jihad said the rocket fire was revenge for Sunday night’s Israeli incursion.

In all, some 300 rockets were fired into Israel by mid-evening, the army said. The Israeli military said it intercepted 70 rockets, and most of the others fell in open spaces. But rockets landed in the southern Israeli town of Sderot, setting off a large fire near a shopping center. Another rocket landed near a factory, and several homes were hit in southern towns. A home in the southern city of Ashkelon was destroyed.

The military said a bus traveling near the border was struck by an anti-tank missile, critically wounding a 19-year-old soldier. Conricus said others were injured in the attack, but gave no further details.