Hamas, the Islamist movement ruling the Gaza Strip, deployed its armed men along the borders with Israel to stop militants from firing rockets at Israel and to prevent an escalation in tit-for-tat violence.

Islam Shahwan, a spokesman for the Hamas-run interior ministry, declined to elaborate on the measures in the field but said the rocket attacks against Israel were carried out by small, unknown militant groups.

The deployment came during an escalation in rocket and mortar attacks by Gaza armed groups at southern Israel and Israeli retaliatory airstrikes, and after Prime Minister Benjamin Netanyahu issued two harsh warnings against Hamas to rein in rocket fire in the Strip.

The first warning was made through Egypt over the weekend, and the second was made earlier on Tuesday, when Netanyahu said during a press conference with his Canadian counterpart, who is currently visiting Israel, that Hamas and other terror organizations should beware a harsh Israeli response if they choose to attack.

"If Hamas and the rest of the terror organization have forgotten their lesson, they will be reminded very hard very soon," Netanyahu told reporters on Tuesday.

No Palestinian groups have claimed responsibility for the rocket fire in recent days, which sparked fears of another large-scale Israeli military operation, similar to the last one in November 2012.

Meanwhile, Ansar Bait al-Maqdis, a Sinai-based militant group, claimed responsibility for two rockets fired overnight at the southern Israeli Red Sea resort of Eilat, Israeli media reported. The rockets landed in the desert outside the city, Israel police spokesman Micky Rosenfeld said.

Open gallery view An Israeli tank drives along the Israel-Gaza Border following clashes between the army and Palestinian gunmen, Nov. 12, 2008. Credit: AP