Israel’s ceasefire with the Islamist group Hamas came into effect on Thursday morning preceded by some last-minute clashes that added to doubts about how long lasting it might be.

Just two hours before it began at 6am, the Israeli air force attacked what it called a rocket squad in the central part of the Gaza Strip. The Israeli army said that 40 rockets and mortar shells had been fired from Gaza by nightfall on Wednesday.

Indicating the fragility of the ceasefire, both Israel and Hamas threatened military action should the other side violate the pact. Ehud Olmert, Israel’s prime minister, said in a newspaper interview that the ceasefire was the last chance for Hamas to avoid a large-scale Israeli military incursion into Gaza. “We are at the end of our tolerance with regard to terror in Gaza,” he said.

The Egyptian-mediated truce calls for Hamas and other militant groups in Gaza to halt their almost daily bombardment of southern Israeli communities. Israel has agreed both to end airstrikes and military raids into the impoverished territory that have killed hundreds of Palestinians in the past year, and to loosen a crippling economic blockade.

Should the ceasefire hold, Israel plans next week to allow more basic commodities such as medicines and meat and dairy products into Gaza. It eventually aims to increase the inflow of goods such as building materials. Later, the two sides will address Israel’s insistence on the release of Gilad Shalit, the soldier held captive by Hamas since 2006.

But the deal’s terms are drawing anger in Israel. Benjamin Netanyahu, leader of the right-wing Likud party who is vying for the prime minister’s post, called the truce “artificial” and criticised it for not including the release of Mr Shalit.

Copyright The Financial Times Limited 2018. All rights reserved.

Comments have not been enabled for this article.