STAMFORD, Conn. (AP) — A Connecticut man who was convicted of killing a cab driver who was stabbed 127 times has been sentenced to 60 years in prison after having testified that he acted in self-defense.

Shota Mekoshvili was sentenced to the maximum prison time on a murder conviction Tuesday in Stamford Superior Court.

Prosecutors say the 32-year-old Stamford man killed Mahomed Kamal during a botched robbery in August 2014.

Mekoshvili testified he was defending himself when the 47-year-old cab driver tried to have sex with him after driving him to a quiet neighborhood in Stamford. He said he wrestled the knife away from Kamal before stabbing him.

Judge John Blawie called the killing an act of torture.

Kamal's wife asked for the maximum sentence, but said it wouldn't erase the pain of losing her husband.