The incident occurred in a train carriage on the light rail network near Jerusalem's municipality building and the walled Old City. TV footage showed blood on the floor of the carriage with police officers restraining a man and carrying him away.
Israeli police said the victim was a 25-year-old British national, though it was initially unclear whether she also held Israeli citizenship.
The Shin Bet domestic security service identified the assailant as 57-year-old Jamil Tamimi and said he was a Palestinian from Arab East Jerusalem with mental health problems who was convicted in 2011 for sexually assaulting his daughter.
"This is one of many instances where a Palestinian suffering personal strife ... chooses to carry out an attack in order to find release for his problems," the Shin Bet statement said.
It added that the assailant had previously tried to commit suicide by attempting to swallow a razor blade.
Friday is sometimes a day of heightened tensions in Jerusalem's Old City when tens of thousands of Muslim worshippers come to pray at the Al-Aqsa Mosque compound.
A wave of street attacks by Palestinians in Israel, Jerusalem and the Israeli-occupied West Bank since October 2015 has previously killed 37 Israelis and two American tourists. At least 242 Palestinians have died during the period of sporadic violence.
Israel says at least 162 of the Palestinians killed had launched stabbing, shooting or car ramming attacks. Others died during clashes and protests.
Israel has accused the Palestinian leadership of inciting the violence. The Palestinian Authority, which exercises limited self-rule in the West Bank, denies incitement and charges that in many cases, Israel has used excessive force in thwarting attackers armed with rudimentary weapons.
(Writing by Ori Lewis, Editing by Mark Heinrich)
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)
Get the latest election news, live updates and election schedule for Lok Sabha Elections 2019 on ndtv.com/elections. Like us on Facebook or follow us on Twitter and Instagram for updates from each of the 543 parliamentary seats for the 2019 Indian general elections.