A Hamas spokesman praised a terror attack in the central West Bank on Thursday, calling it “heroic,” but stopped short of claiming responsibilty.

Two Israelis were killed and two others were severely injured in the drive-by shooting near the Ofra settlement, medics and officials said.

“The heroic Silwad operation is a response to the Zionist occupation’s crimes and behavior in the occupied West Bank,” Abdelatif al-Qanou, a spokesman for the terror group, wrote on Twitter, referring to a Palestinian village near Ofra. “The West Bank’s youth and men will remain rebels against the occupation and continue to clash with it until it is banished.”

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

The perpetrators of the attack fled the scene, the IDF said, and troops were searching for them.

Hamas officials have frequently encouraged and praised shooting, stabbing and ramming attacks in the West Bank and Israel.

Both the US and Israel consider Hamas a terrorist group.

Earlier on Thursday, the Izz ad-Din al-Qassam Brigades, Hamas’s military wing, appeared to take responsibility for two other shooting attacks — one earlier this week outside Ofra and another in the Barkan Industrial Zone in the northern West Bank.

“From the heroic Barkan operation to the Ofra operation, the Qassam Brigades are undertaking a new battle,” the Qassam Brigades said in a statement.

Seven people were wounded in the drive-by shooting attack on a bus stop outside of Ofra on Sunday night, including a 30-weeks pregnant woman who was seriously injured. The baby was delivered in an emergency operation, but died on Wednesday afternoon.

In October, 28-year-old Kim Levengrond Yehezkel and 35-year-old Ziv Hajbi were killed in a shooting attack in the Barkan Industrial Zone.

Two Palestinians suspected of separately carrying out the terror attacks in Ofra earlier this week and in Barkan were killed by Israeli forces Wednesday night and Thursday morning.

Salih Barghouti, 29, from Kobar, a village near Ramallah, was killed Wednesday evening after he tried to attack troops while escaping arrest and was shot, the Shin Bet security service said, adding that he was believed to have carried out the Ofra terror attack.

Hamas wrote on its official Twitter account that Barghouti carried out the shooting adjacent to Ofra and said he was a member of the terror group.

Ashraf Na’alowa, 23 and a resident of Shuweika, a village near Tulkarem, was killed Thursday morning, the Shin Bet said early Thursday. Na’alowa was suspected of killing Yehezkel and Hajbi. He remained on the run for over two months, repeatedly eluding capture by Israel security forces.

The Qassam Brigades said he carried out the attack in Barkan and was a Hamas member.