Israel and militant forces in Gaza agreed to a cease-fire early Monday after a weekend of violence that killed at least 27 people and injured hundreds more on both sides of the border in one of the region's most intense flareups of violence in years.

More than 600 rockets were fired into Israel from Gaza beginning Saturday morning, prompting Israel to retaliate with airstrikes.

The Israel Defense Forces, or IDF, signaled Monday that a cease-fire had been reached, saying that "all protective restrictions in the home front" were lifted at 7 a.m. local time. Palestinian media also reported that a truce had been brokered.

A Palestinian family waits for medical help inside an ambulance in Beit Lahia in the Gaza Strip on Sunday. Anas Baba / AFP - Getty Images

At least 23 Palestinians — including two pregnant women, two infants and a child — were killed, along with two unborn children, and 154 more people were injured in the Palestinian enclave, the Palestinian Health Ministry said Sunday night. Barzilai Medical Center in the coastal city of Ashkelon confirmed the deaths of four Israelis on Sunday, adding that more than 110 others had been injured.

Lt. Col. Jonathan Conricus, a spokesman for the IDF, said a Palestinian woman and child who were killed Saturday were not killed by an Israeli weapon. "It was from internal fire," he said.

The Israeli military said late Sunday that 690 rockets were fired toward Israel from Gaza. The country's Iron Dome aerial defense system intercepted 240 rockets, while Israeli forces targeted 350 Hamas and Islamic Jihad targets in Gaza.

On Monday, Israeli Prime Minister Benjamin Netanyahu said that "the campaign is not over and requires patience and judgment. We are preparing to continue. The goal was and remains to ensure the peace and security of the residents of the south."

The military said it struck rocket launchers, tunnel shafts, "terror squads and operatives," and weapons-making factories belonging to Hamas, the Islamic militant group that controls Gaza, and the Iranian-funded group Palestinian Islamic Jihad.

Sirens sounded throughout the weekend in southern Israel to warn of incoming rockets. In Gaza, large explosions thundered across the blockaded enclave as plumes of smoke rose.

The outburst of fighting broke a month-long lull as Egyptian mediators had been trying to negotiate a long-term cease-fire between the two sides, who have fought three wars and several other rounds of conflict over the last decade.

Israeli Cabinet ministers issued a statement Sunday after meeting for nearly five hours, saying the "ultimate consideration is the security of the state and its residents."

Earlier, Netanyahu 's office told NBC News that he had told David Friedman, the U.S. ambassador to Israel, and ambassadors from Europe that Hamas was "committing a double war crime by indiscriminately shooting at civilians from civilian centers."

President Donald Trump said Sunday night on Twitter that "the Gazan people" should "END the violence" and that the United States supported Israel "100% in its defense of its citizens."

The cease-fire comes as Israel marks Memorial Day and Independence Day this week, when masses head out to ceremonies at military cemeteries and street parties across the country. The next week, it will host the Eurovision song contest, for which large groups of tourists are expected to arrive.

For Gazans, it comes ahead of the Muslim holy fasting month of Ramadan, which began Monday.

A building damaged by a rocket strike from the Gaza Strip in the city of Ashdod, Israel. JACK GUEZ / AFP - Getty Images

Hamas, which seized control of Gaza in 2007, most recently engaged in several days of heavy fighting with Israel in March before Egypt brokered a truce, under which Israel agreed to ease a crippling blockade on Gaza in exchange for a halt in rocket fire. Hamas has said it hopes that Egyptian mediators could further ease the blockade, which has ravaged Gaza's economy.

In recent days, Hamas has accused Israel of reneging on its pledges as militants began to fire rockets into Israel. Israel, in turn, accused Islamic Jihad of instigating the latest round of violence by shooting and wounding two Israeli soldiers Friday. In response, Israeli aircraft carried out retaliatory strikes, killing two Hamas militants, it said.

On Friday, two Palestinians were shot and killed by Israeli forces during the weekly protests along Israel-Gaza perimeter fence.

For more than a year, the Islamic group has orchestrated mass demonstrations every week along the Israeli frontier to draw attention to Gaza's plight. More than 200 Palestinians and an Israeli soldier have been killed in the border protests.