JERUSALEM (Reuters) - Palestinian militants fired two rockets deep into southern Israel from Gaza on Saturday, and the Israeli military responded with a number of air strikes on militant targets, shaking an already tenuous truce.

Slideshow ( 10 images )

Sirens sounded in the middle of the night in Beersheba, the largest city in southern Israel, some 35 km (18 miles) from the Gaza border, warning of incoming fire. The military said its missile defenses intercepted the two rockets.

A few hours later, Israeli aircraft struck a number of militant outposts belonging to Hamas, the Islamist group that rules Gaza. No injuries were reported.

The overnight rocket attack came nearly two days after a ceasefire ended a flare-up in cross-border violence between Israel and a smaller Palestinian militant group, Islamic Jihad.

The worst fighting in months was triggered on Tuesday when Israel killed a top commander from the Iranian-backed Islamic Jihad, deeming him an imminent threat.

Gaza medical officials said 34 Palestinians had been killed in the two days of fighting, almost half of them civilians.

At the same time, hundreds of rocket launches by militants paralyzed much of southern Israel and reached as far north as Tel Aviv, sending entire communities to shelters. Dozens of Israelis were injured.

Throughout the fighting, Hamas, the dominant force in Gaza, appeared to have stayed on the sidelines. That may have helped stem the escalation.

Israel’s military, however, said on Saturday that it would hold Hamas responsible for any attack emanating from Gaza.

“Hamas will bear the consequences for actions against Israeli civilians,” it said in a statement.