The Palestinian gunman who killed a rabbi and father of 10 in a West Bank ambush nearly a month ago was killed in a shootout with Israeli security forces near Hebron.

Soldiers and police surrounded the house of Muhammad al-Fakih, 29, who is said to have been the member of the Hamas terror cell who pulled the trigger in the attack on the family as they traveled in their car on Route 60, a main thoroughfare in the southern West Bank.

Rabbi Michael “Miki” Mark, head of the Otniel Yeshiva, was killed in the July 1 attack. His wife was shot in the head and seriously wounded, and two of their teenage children were injured.

Three other men have been arrested in connection with the attack. One of the arrested has been identified as a member of the Palestinian Authority security forces, according to Israel’s Channel 2.

Al-Fakih reportedly fired on the Israeli troops who surrounded his house. The troops returned fire, including reportedly hitting the building with an anti-tank missile. The building was then mostly knocked down by an Israeli army bulldozer. Weapons including a Kalashnikov rifle and a homemade grenade were discovered in the house, Ynet reported.

Al-Fakih reportedly served time in an Israeli jail for ties to the Islamic Jihad terror group, but switched his allegiance to Hamas while in prison.