Israeli forces on Tuesday shot and killed two Hamas operatives suspected of kidnapping and killing three Israeli teenagers in June.

The abduction of the three Jewish students in the West Bank — followed by the Israeli military’s mass arrests of Hamas members — was part of a cascade of events that led eventually to the 50-day war in Gaza, one of the bloodiest in years of conflict between Israel and the Palestinians.

Lt. Col. Peter Lerner, an Israeli military spokesman, said the two suspects were surrounded by Israeli forces at a carpentry workshop in Hebron, where they had been hiding for a week. He said that there was an exchange of gunfire and that Marwan Kawasmeh, 29, and Amer Abu Aisha, 32, were killed as they emerged from the building.

A neighboring shopkeeper said Israeli special forces units arrived about 3 a.m. and began an assault on the building, which became charred in a raging fire. The merchant said one of the suspects was fatally shot in the street and the other was found dead and burned in the basement.

“We went in understanding that they intended to fight, and they came out with guns blazing,” Lerner said.

Three Israeli seminary students, from left, Naftali Fraenkel, 16, who also holds a U.S. citizenship, Gil-Ad Shaer, 16, and Eyal Yifrah, 19, are seen in this combination picture of undated family handout photos released June 16, 2014. Israeli troops on September 23, 2014 killed two Palestinians blamed for abducting and killing the three Israeli youths in the occupied West Bank in June, the military said (Handout/Reuters)

The second man ran back inside the building, apparently wounded, and the Israelis threw in grenades, Lerner said, igniting the fire.

Brig. Gen. Avi Yedai, head of the Israeli military in the West Bank, told Israel Radio that the kidnappers had been given a chance to surrender.

Omar Kawasmeh, father of one of the dead men, complained that his son’s body was “covered with bullet wounds.” Asked whether his son was responsible for killing the three Jewish teens, he changed the subject and did not respond.

“Even if they are guilty of something, arrest them, don’t shoot them,” he said.

Kamel Hmeid, governor of Hebron, told Voice of Palestine radio that the two men had been “executed” by Israel.

Salah Bardawil, a Hamas spokesman in Gaza, said the group “mourns the two martyrs . . . who were murdered by the Zionists.”

He said the deaths of the two Palestinians would not have occurred without help from Palestinian Authority security forces in the West Bank, assistance that Hamas deplores as collaborating with the enemy.

Palestinians inspect the scene where Israeli troops shot and killed two Palestinians, Marwan Kawasme and Amar Abu Aysha, in the West Bank city of Hebron on Sept. 23. (Ammar Awad/Reuters)

Naftali Fraenkel and Gilad Shaar, both 16, and Eyal Yifrach, 19, were abducted June 12 while hitchhiking home from their religious schools in the West Bank.

After an 18-day search, their bodies were found buried under rubble in a field not far from where they had been kidnapped. Israeli police say they probably were shot within minutes of being bundled into a stolen car.

One of the teenagers had managed to make a quick, furtive call to an emergency line, saying he had been kidnapped. The call was initially believed to be a prank.

After the kidnapping, Israeli forces conducted thousands of house-to-house searches and arrested more than 350 Palestinians, including top political leaders from Hamas and former Hamas prisoners who had been released in a deal to free a captured Israeli soldier.

Palestinians said they were being subjected to “collective punishment,” and they reacted with demonstrations and violent clashes. Several Palestinians, including teenagers, were killed by Israeli forces.

While Israeli forces searched for the missing students, police said, an Israeli eyeglass shop owner and two young relatives kidnapped Mohammad Abu Khieder, 17, from his East Jerusalem neighborhood, then beat and burned him alive in a revenge killing.

After the bodies of the Israeli teenagers were found, Saleh Arouri, a senior leader of Hamas, boasted at a conference in Turkey that the group’s military wing was behind the “heroic action.”

“It was an operation by your brothers from the al-Qassam Brigades,” Arouri said, adding that Hamas hoped to use the Israeli teens in a trade for Palestinians held in Israeli jails.

Another Hamas member, Hussam Kawasmeh, Marwan Kawasmeh’s uncle, was charged by the Israelis in September with organizing and funding the kidnapping.

Prime Minister Benjamin Netanyahu spoke Tuesday with the parents of the Israeli teens and later said: “Nothing can assuage their pain, and nothing can bring back their wonderful, dear boys. But I told them that justice has been done and that we had carried out the mission that we promised to them and all of Israel.”

Shmuel Cohen, grandfather of Shaar, told Israeli media that “this has a lot of meaning. The world needs to know that Jewish blood is not abandoned, and whoever harms a Jew has his blood on his hands.”

Hazem Balousha in Gaza City contributed to this report.