Israel warned it was closer to war in Gaza than it had been in years after Palestinian militants fired dozens of mortars at Israeli towns and Israel’s military responded with heavy airstrikes across Gaza.

In the most serious exchange of fire between the two sides since the end of the 2014 conflict, Israel’s military said waves of missiles were fired out of Gaza into southern Israel. At least three soldiers were wounded. One shell fell into the yard of a kindergarten, spraying the front of the school with shrapnel.

Israel accused the militant group Islamic Jihad of doing most of the shelling but said Hamas, the Islamist faction which controls Gaza, also participated in the attack. Israeli jets struck more than 30 Hamas and Islamic Jihad bases across Gaza in response, the military said. No injuries were reported in Gaza from the strikes.