A Palestinian man has been shot dead after stabbing two Israeli soldiers in the occupied West Bank before being shot dead, Israeli military said.

One of the soldiers was critically wounded by a stab wound to the neck while the other was lightly hurt before he opened fire and killed the attacker on Wednesday. Both soldiers were taken to a hospital.

"Israeli forces on the scene shot and killed the Palestinian assailant," the military said in a statement.

The attack occurred near the settlement of Shilo, about 50km north of Jerusalem. The Israeli military said the attacker came from the nearby Palestinian village of Sinjil, and that Israeli forces had conducted searches in the village after the incident.

Israel saw a wave of similar attacks in the West Bank and Jerusalem towards the end of last year, but the violence has mostly subsided.

Source: Agencies