JERUSALEM (Reuters) - An Israeli court sentenced a Palestinian to 18 years imprisonment on Monday for stabbing to death a British woman in Jerusalem last year, under a plea bargain acknowledging he is mentally ill.

FILE PHOTO: Israeli policemen block a road where the light train passes following a stabbing attack just outside Jerusalem's Old City, according to Israeli police April 14, 2017. REUTERS/Ammar Awad/File Photo

Jamil Tamimi, 59, killed 21-year-old exchange student Hannah Bladon on a tram as she was going to the church where she volunteered, the court heard. He targeted her at random when she came within his reach after offering her seat to an older woman, stabbing her at least seven times.

“This was not a terrorist incident ... This was a terrible murder carried out by a mentally ill person,” the prosecutor said, explaining why a life prison sentence had not been sought, according to a court transcript.

Tamimi’s lawyer said the defendant attacked Bladon in a rage at his sons insisting that he stay in a mental institution rather than with them. “This drove him to stab a person to death so that he would be shot dead,” the lawyer said.

In the April 14, 2017 incident, Tamimi was overpowered and arrested.

Dozens of Palestinians who carried out similar attacks, many of them as a political act against Israel, have been shot by security forces or armed civilians.

Bladon’s relatives said the sentence was too lenient.

“For the family, it makes no difference whether this was a terror attack or just another crazed murderer,” the family’s representative, Israeli lawyer Maurice Hirsch, told Reuters.

“They are outraged by the leniency of the sentence. They expected that Hannah’s murderer would spent the rest of his life behind bars.”

The court transcript quoted Tamimi as saying after sentencing: “I’m sorry. I wish I could take her (Bladon’s) place. I did not mean to murder her. I don’t know how it happened.”