A Jordanian citizen stabbed and wounded an Israeli police officer who then shot him dead in Jerusalem's Old City on Saturday, Israeli police said.
Police spokeswoman Luba Simri said the officer was walking down a street when he was attacked.
"The terrorist rushed toward him, whipped out a knife that he had in his possession, stormed him and began stabbing him. The police officer responded with determination and in a professional manner, managed to activate his weapon and neutralized him," Simri said.
The attacker, she said, was a 57-year-old Jordanian who had arrived in Israel for a visit a few days ago.
Israel's ambulance service Magen David Adom said the police officer was not severely wounded.
Israel and the Palestinian Territories have seen a series of sporadic attacks since October 2015, although they have not often involved Jordanians.
At least 244 Palestinians have been killed since the violence began. Israel says at least 164 of them were carrying out stabbings, shootings or car ramming attacks. Others died during clashes and protests.
Thirty-seven Israelis, two American tourists and a British student have been killed in Palestinian street attacks which have slowed in recent months, though not stopped.
Israel says the Palestinian leadership is inciting the violence. The Palestinian Authority, which exercises limited self-rule in the West Bank, denies incitement and says that in many cases Israel has used excessive force in thwarting attackers armed with rudimentary weapons.
Israel and Jordan signed a peace accord in 1994.