Saturday's incident started with an Israeli raid, which the military said aimed to arrest Hamza Abu el-Heija, a 22-year-old Hamas operative wanted for involvement in shooting and bombing attacks against Israelis.
Lt. Col. Peter Lerner described el-Heija as a "ticking bomb" and said he was wanted for months and was allegedly in the final stages of planning a major shooting attack against Israelis.
Palestinians officials said the military ringed the house in the Jenin refugee camp overnight and ordered el-Heija outside. When he refused to come out, the soldiers stormed the building and a shootout ensued.
Lerner said everyone but el-Heija had left the building before the shootout. The military says el-Heija first shot an attack dog that was sent inside and then opened fire on the troops outside, wounding two soldiers. When he attempted to escape while still shooting at the Israelis, the troops returned fire and killed him, Lerner said.
Within minutes, hundreds of angry residents and gunmen gathered and attacked the soldiers. The troops opened fire and killed two Palestinians and wounded several more, he said. The military initially said three Palestinians were killed in the shootout but later corrected and revised the number.
El-Heija was the son of Hamas leader Jamal el-Heija, one of the longest serving prisoners being held in Israel. From his prison cell, the father praised his son's "heroism" and "blessed his confrontation with occupation forces until his last bullet," adding that he prayed in prison for his martyrdom.
The three main Palestinian militant groups, linked to Hamas, Islamic Jihad and Abbas' Fatah, issued a joint statement warning of retribution against Israel and the Palestinian leadership for allegedly cooperating with it.
"The resistance in the West Bank is alive and won't die, and the Zionist enemy can't guess from where the resistance will attack. The blood of Jenin Martyrs won't go in vain," the groups said.
The Palestinian Authority bears "equal responsibility" along with Israel for the violence in Jenin, they said, adding that "our people won't forgive the Palestinian security apparatuses for this crime."
Throughout the day protesters in the West Bank and east Jerusalem hurled stones at Israel troops in response to the early morning event in Jenin. Outside one of the gates of the Old City of Jerusalem, demonstrators chanted and waved the Palestinian flag before they were dispersed by Israeli troops.
The Jenin refugee camp has been a flashpoint for violence in the past. During the Palestinian uprising last decade, the military launched a huge operation there to root out militants and dozens were killed.
Tensions have been heating up again in recent months with the perceived lack of progress in peace talks.
Under heavy U.S. pressure, Israel and the Palestinians restarted negotiations last July, setting a nine-month target for wrapping up a comprehensive peace deal establishing a Palestinian state and ending a century of conflict.
After realizing this was unrealistic, U.S. Secretary of State John Kerry scaled back his ambitions and said he would aim for a "framework" peace deal by the April deadline. With even that more modest goal in question, the sides are now searching for a formula that will allow the talks to continue.
The Palestinians have two demands for an extension of the talks: a freeze in Israeli settlement construction in the West Bank and east Jerusalem, and the release of the most senior Palestinian prisoners held by Israel.