“A suspect armed with a knife committed a terrorist attack near Shivtei Israel light rail station in Jerusalem,” Israeli police said in a statement. “The suspect was neutralised on the spot."
A border police officer who was travelling in a tram saw the attack as it happened and took action, the police said. He “promptly disembarked from the train and fired”, hitting the suspect, they said.
The fatal shooting occurred on the same night that Palestinian militants detonated a bomb near a convoy of Israeli troops escorting Jewish worshippers to a holy site in the occupied West Bank.
Four of the soldiers were wounded, including an officer, in the late-night explosion in Nablus, a stronghold of Palestinian militants in the northern West Bank, the army said.
The attacks came hours after fighting erupted in a Palestinian refugee camp between local residents and their own security forces, killing a Palestinian man, 25.
The bloodshed was the latest in a deadly wave of violence that has gripped the area over the past year and a half and shows no signs of abating.
The soldiers were taken to a nearby hospital for treatment. One was moderately wounded and the rest suffered only light injuries
Amateur video on social media showed a large plume of white smoke rising into the air after the blast.
The troops were escorting worshippers to Joseph’s Tomb – a flashpoint shrine where some Jews believe the biblical Joseph is buried.
The Israeli army said the blast struck when its troops were trying to clear the way for worshippers and that no civilians were harmed.
In the teen shooting, police spokesman Dean Elsdunne said the deceased was a “minor” from East Jerusalem, a predominantly Palestinian area.
He was from the Beit Hanina neighbourhood in East Jerusalem, Mr Elsdunne said.
The Magen David Adom emergency service said it had treated a man aged about 25 who had been stabbed in the back. He was later taken to hospital.
The wounded man was in a “stable” condition, Shaare Zedek Hospital said.
Dozens of Israeli security personnel converged on the station, where many ultra-Orthodox Jews were also gathered.
Hamas, which controls Gaza, said the attacker had carried out a “heroic” operation at the tram station.
The Palestinian-Israeli conflict so far has claimed the lives of at least 223 Palestinians this year.
At least 31 Israelis, a Ukrainian and an Italian have also been killed this year, AFP reported.
Combatants and civilians have died.