JERUSALEM — Two Israeli soldiers were killed near Ramallah late Thursday morning in the area’s second deadly shooting in less than a week, prompting the military to seal off the Palestinian city and raising fears that the West Bank could be entering a new phase of violence.

The broad-daylight shooting came on top of news that Israeli security forces had found and killed two Palestinian fugitives in the West Bank overnight. The two men were suspected of carrying out a pair of brutal attacks — one in October that left two Israelis dead at a West Bank factory, the other a drive-by shooting on Sunday that killed a three-day-old baby.

Hamas, the militant group that controls Gaza and has been seeking to foment violence on the West Bank, praised Thursday’s shooting and said that the two slain fugitives had been members of its military wing, though Hamas leaders did not specifically claim responsibility for the attacks.

Israeli analysts, who attributed all three attacks to Hamas, said the group was trying to prove its relevance and signal that it remained a political force on the West Bank. The attacks created political trouble for Prime Minister Benjamin Netanyahu, who recently took on the additional portfolio of defense minister, and Mahmoud Abbas, the Palestinian Authority president.