The assailant was shot dead after stabbing a soldier and an Israeli civilian.
An Israel Police spokeswoman said that when the attacker failed to grab the gun, he first tried to strangle the soldier, then took out a knife and stabbed him.
The bus stopped when a civilian passenger began struggling with the attacker.
A police officer who was nearby boarded the bus and attempted to tackle the assailant.
During the struggle, police said, the attacker succeeded in grabbing the officer’s gun.
Another officer who boarded the bus saw the attacker with the pistol and shot him, the police said.
Both victims were taken to Hadassah Hospital in Ein Kerem for treatment.
Police closed the entrance to the city following the attack.