JERUSALEM — Militants in Gaza fired more than 250 rockets into southern Israel on Saturday, and Israel responded with airstrikes and artillery fire, ending weeks of relative calm and threatening efforts to forge a long-term truce.

Palestinians said at least four people, including a pregnant woman and a baby, were killed by Israeli strikes. 

In Israel, rocket sirens blared, and thousands of Israeli civilians — as far as 30 miles from Gaza — spent the day in or close to bomb shelters. Rocket fire and airstrikes continued into the night. 

The Israeli military said in a statement that its Iron Dome air-defense batteries intercepted dozens of the rockets. Israeli emergency services said an 80-year-old woman was seriously injured by shrapnel during the rocket barrage and a 50-year-old man was treated for moderate wounds. 

In Gaza, health authorities said two men, 22 and 25, and a 37-year-old pregnant woman and her 14-month-old daughter were killed as Israeli jets carried out airstrikes. An additional 18 people were injured. Israeli officials said they hit dozens of “terror targets” inside the Palestinian enclave, which is controlled by the Palestinian militant group Hamas.

Saturday’s violence comes in the midst of negotiations over a longer-term truce between Hamas and Israel, during which the militant group has tried to assert pressure with rocket fire and incendiary balloons. Hamas is attempting to secure an easing of Israeli restrictions on trade and movement, in return for a lull in violence. 

However, the Israeli military said Islamic Jihad, Gaza’s second-largest militant group, which is also involved in the negotiations, was responsible for the rocket fire. 

It also said tanks and military jets targeted sites in the northern and eastern sections of Gaza, including an Islamic Jihad tunnel and Hamas military intelligence and general security buildings. The Israeli army’s chief of staff, Lt. Gen. Aviv Kochavi, met with senior security officials, and Prime Minister Benjamin Netanyahu was expected to be briefed. 

The Turkish news agency Anadolu said its Gaza office had been hit in an Israeli strike. 

U.N. peace envoy Nickolay Mladenov called for calm. 

“Continuing down the current path of escalation will quickly undo what has been achieved and destroy the chances for long time solutions to the crisis,” he said in a statement. “This endless cycle of violence must end, and efforts must accelerate to realize a political solution to the crisis in Gaza.”

Israeli President Reuven Rivlin said Israel would “respond forcefully and swiftly to any attack on the security of our people.” 

Israeli authorities said schools in the cities of Beersheba, Ashkelon and Ashdod would be closed Sunday. 

In a joint statement, Gaza’s militant factions said the rocket fire was in response to the “targeting and assassination” of their militants a day earlier. “Our response will be tougher and larger and broader in the face of aggression,” they said in a statement. 

The Israeli military reported on Friday that two soldiers were lightly wounded in a shooting incident along its border with Gaza. In response, Israel struck sites belonging to the Izzedine al-Qassam Brigades, Hamas’s military wing, killing two fighters.   

Also on Friday, two Palestinian protesters were killed taking part in ongoing weekly demonstrations at the border fence with Israel, the Palestinian Health Ministry said. 

“It’s a reply to the Israeli targeting of peaceful civilians yesterday by Israeli snipers during the 58th Friday of Great March of Return,” said Basem Naim, a member of Hamas’s bureau for international relations, referring to the weekly protests staged in Gaza since last year. “Also, to the procrastination policies of the occupation toward lifting the siege on Gaza.”

Gazans have been holding weekly demonstrations along the border, protesting the dire humanitarian situation in the strip that worsens daily and the ongoing land, sea and air blockade imposed by Israel since Hamas forcibly took power in 2007. Egypt opens its border with Gaza only sporadically. 

Hamas spokesman Abdullatif al-Qanoua said the group would continue to “respond to the crimes of the occupation” and “not allow the blood of our people to be shed.” 

Musab al-Buraim, spokesman for Islamic Jihad, said in a short statement that it too was committed to “resistance.” 

Representatives of Hamas and Islamic Jihad visited Egypt this past week to discuss the understandings reached with Israel to reduce tensions. The Egyptians have spent months trying to forge a long-term truce between the sides to bring calm and ease conditions for 2 million Gazans.

But Saturday’s unrest, disrupting the lives of so many Israeli citizens, could impact attempts by Netanyahu to form a coalition after being reelected for a fifth term. His last government began to unravel after a similar flare-up with Gaza, when then-Defense Minister Avigdor Liberman resigned after calling for a tougher approach to the rocket fire.

Standing down from his post in November, Liberman, head of the hawkish Yisrael Beiteinu party, said that agreeing to the cease-fire with Hamas was “surrendering to terror.” He proposed firmer military action against Hamas and other militant factions in Gaza, even if that risked a wider conflict.

In March, Netanyahu’s trip to Washington to meet with President Trump and speak at the annual AIPAC policy conference was cut short after a rocket fired from Gaza slammed into a house in central Israel. 

Rocket fire and airstrikes similar to Saturday’s happen periodically. 

In 2014, a 50-day deadly war between Israel and Hamas saw hundreds of rockets being fired into Israel, reaching as far as Tel Aviv, and massive Israeli aerial bombardments, killing more than 2,000 Palestinians. More than 70 Israelis and one foreign national were also killed.

There were worries in Israel that unrest could disrupt preparations for the Eurovision Song Contest, an international singing event taking place in Tel Aviv this month. Contestants from across Europe are already in Israel to prepare for the event.

Balousha reported from Gaza. Morris reported from Tel Aviv.