JERUSALEM — Militants in the Gaza Strip fired dozens of rockets Wednesday into southern Israel, sending civilians rushing into bomb shelters but causing no casualties. The Israeli military said it was the largest rocket barrage since 2012, when it launched an eight-day air campaign in Gaza that it said was aimed at stopping the attacks.
The Israeli military said its aircraft targeted ‘‘29 terror sites in the Gaza Strip’’ in retaliation late Wednesday.
Gaza health official Ashraf Al Kedra said nobody was hurt in the Israeli strikes, which he said targeted training sites used by Islamic Jihad and Hamas militant groups.
Israel’s military said more than 40 rockets were fired over two hours, with three intercepted by its ‘‘Iron Dome’’ missile defense system and eight hitting populated areas. The others fell in open areas.
‘‘This retaliation was precise and prompt. We targeted the infrastructure that serves the terrorists while they train, plan, and implement their hideous attacks,’’ Israeli military spokesman Lieutenant Colonel Peter Lerner said.
Earlier, Israeli tanks fired at ‘‘terror infrastructure’’ in Gaza, the Israeli military said, saying it confirmed at least one hit. Residents in the Beit Hanoun area of Gaza said they saw an Israeli strike hit a rocket launcher squad.
Israeli police spokesman Micky Rosenfeld said one rocket exploded near a gas station and another near a public library.
In Gaza, the Islamic Jihad militant said it fired 20 rockets to avenge the deaths of three of its members killed in an Israeli airstrike the day before. The Israeli military said they fired at soldiers with mortars.
US State Department spokeswoman Jen Psaki said that Washington ‘‘condemns in the strongest terms today’s rocket attacks into Israel by terrorists from the Gaza Strip . . . Israel, like any nation, has a right to defend itself.’’