JERUSALEM — Two Israelis were killed and one other seriously wounded after a Palestinian assailant opened fire at two locations in the occupied West Bank on Sunday, Israeli authorities said, the latest in a spate of shootings.

Lt. Col. Jonathan Conricus, an Israeli army spokesman, said a manhunt was underway for the assailant, who fled the area after first assaulting an Israeli soldier with a knife, stealing his weapon and then opening fire on passing vehicles and at an intersection. 

“We will spare no effort to find this perpetrator and bring him to justice,” Conricus said in a news briefing. The army confirmed later that one of the slain Israelis was a soldier, Staff Sgt. Gal Keidan.

Rabbi Achiad Ettinger, a father of 12 from the nearby settlement of Eli, also died from wounds sustained in the attack, his family announced. It was not immediately clear whether the assailant was acting alone or as part of a terrorism cell.

Israeli Prime Minister Benjamin Netanyahu said the army was “in pursuit of the terrorists,” indicating that there may have been more than one gunman.

“I am certain that we will apprehend them, and we will deal with them to the fullest extent of the law, as we have done in all of the recent incidents,” Netanyahu said.

The shooting comes just three weeks before a general election on April 9 and puts the long-serving Israeli leader in the difficult position of not appearing too soft in dealing with such attacks but also avoiding further inflaming tensions.

Netanyahu draws a large portion of his base from the roughly 450,000 Israeli Jews who live in the West Bank, territory that Israel captured in the 1967 Israeli-Arab war and Palestinians hope to include in a future sovereign state. Many in the international community consider these settlements illegal. 

Immediately after Sunday’s shooting, two militant Palestinian factions — Hamas and Islamic Jihad — released statements praising the attack as “heroic.” Hamas, the Islamist group that rules the Gaza Strip and has an increasingly powerful presence in the West Bank, said the shooting was in response to “the crimes of the Israeli occupation.” 

Such attacks on Israelis have increased tensions in the West Bank in recent months. Figures published by Israeli authorities show an overall decrease in attacks, but they have grown more severe.

Official figures also show a rise in violence by settlers against Palestinians. The January shooting of a Palestinian man in the village of Mughayyir, allegedly by members of a volunteer security team from the nearby settlement of Adei Ad, is still being investigated.

Sunday’s incident follows two deadly shootings by Palestinians against Israelis in December. In the first, near the settlement of Ofra, a pregnant woman was shot in the stomach, forcing her to give birth via emergency Caesarean section to a baby boy, who later died. The second killed two soldiers.

Also, in the same area in October, a Palestinian gunman shot two Israeli civilians and then fled the scene, evading an Israeli military manhunt for more than two months. 

In its statement on Sunday’s attack, Hamas said the shooting was in response to recent events, particularly a dispute last week over the opening of a gate at one of the entrances to the al-Aqsa Mosque compound in Jerusalem, as well as the expansion of Israeli settlements and the confiscation of Palestinian lands. 

“This courageous and bold action confirms that the choice of resistance in all its forms is the strongest and most effective option to deter the occupation,” Hamas said in the statement. It called the West Bank a strategic asset for the Palestinian resistance. 

Islamic Jihad said the settlement of Ariel, not far from where the shooting occurred, was built on land stolen from the Palestinians.

“The voice came from the West Bank to alert everyone to the basic contradiction of the occupation,” said Daoud Shihab, an Islamic Jihad spokesman.

Hazem Balousha in Gaza City contributed to this report.