An Israel Defense Forces tank and aircraft carried out strikes on two Hamas positions in the Gaza Strip on Thursday evening in retaliation for Palestinian rocket attacks.

The strikes came as a terrorist group in the Strip launched a rocket that hit an open field in the south of the country, after two previous attacks that failed to reach Israeli territory, the army said.

The retaliatory strikes targeted Hamas positions even though a different group, the salafist Tawhid al-Jihad, took responsibility for the launches.

Get The Times of Israel's Daily Edition by email and never miss our top stories Free Sign Up

“The IDF holds Hamas responsible for the hostile activity perpetrated against Israel from the Gaza Strip,” the army said in a statement.

A military spokesperson said the incoming rocket alert siren was not activated by the third launch — as it was by the first two — because the system detected that the projectile was not heading toward a populated area.

“When it’s going to an open field, we try not to scare the public,” the spokesperson said.

The first two launches set off the alarm shortly after 6 p.m., in the Hof Ashkelon and Sha’ar Hanegev regions, northeast of the Gaza Strip.

The IDF sent soldiers to inspect the area for signs of impact, but, finding none, determined that the two rockets had not reached Israeli territory, a spokesperson said.

In the hours afterward, the Tawhid al-Jihad group claimed responsibility for the attack on social media. The small, radical group is affiliated with al-Qaeda.

The rocket launches and Israeli retaliation on Thursday night came amid unrest in the Gaza Strip and West Bank, after US President Donald Trump recognized Jerusalem as Israel’s capital the day before. On Thursday, Hamas terror group leader Ismail Haniyeh called for a new Palestinian intifada, or uprising.

The launches also come five weeks after the Israeli military destroyed an attack tunnel belonging to the Palestinian Islamic Jihad terrorist group, which crossed into Israel from the Gaza Strip. In the blast and its aftermath, 12 members of the terrorist group were killed, along with two Hamas operatives.

Throughout the day on Thursday, Palestinians in Gaza marched, waved Palestinian flags and burned photographs of Trump and Prime Minister Benjamin Netanyahu, as well as Israeli and American flags.

Dozens of Palestinians in Gaza also staged violent protests along the security fence surrounding the coastal enclave, throwing rocks and rolling burning tires at the barrier and the Israeli soldiers on the other side.

Israeli troops responded to the protests initially with less-lethal riot dispersal measures and then with live rounds, injuring several of the “main agitators,” the army said.

Last week, the Islamic Jihad launched a dozen mortar shells at an army post northeast of the Strip, causing no injuries but some damage to army equipment.

The military retaliated with six strikes on terrorist positions in Gaza, four of them belonging to the Islamic Jihad and two to Hamas, which rules the coastal enclave.

In a Wednesday address from the White House, Trump defied worldwide warnings and insisted that after repeated failures to achieve peace a new approach was long overdue, describing his decision to recognize Jerusalem as the seat of Israel’s government as merely based on reality.

Trump also said the United States would move its embassy from Tel Aviv to Jerusalem, though he set no timetable for that.

Trump’s announcement, which was warmly received by Israel, overturns decades of precedent and runs counter to international consensus, with no other country currently taking the same stance.

Jerusalem’s status is among the most difficult issues in the Israeli-Palestinian conflict, and the US traditional position has been that it must be negotiated between the two sides.

While Israel has always considered Jerusalem its capital, with the prime minister’s office and parliament building located there, countries have avoided recognizing it as such to prevent damaging hopes for a two-state solution.

The Palestinians seek the eastern sector of the city as the capital of their future state.

Times of Israel staff and agencies contributed to this report.