ELIZABETH, N.J. (AP) — A man who gained internet fame as “Kai the Hatchet-Wielding Hitchhiker” was sentenced to 57 years in prison Thursday for the beating death of a New Jersey man he had met in Times Square. Caleb McGillvary will have to serve at least 85% of his sentence under terms imposed in state Superior Court in Union County.

The 30-year-old Alberta, Canada, native was convicted last month of killing 73-year-old lawyer Joseph Galfy at Galfy’s New Jersey home in May 2013. Authorities said the two met in New York City and the defendant stayed at Galfy’s home.

READ MORE: University Of Delaware Hosts Campus Safety Event On Gender-Based Violence Following Arrest Of Brandon Freyre

‘There Was A Guy In There’: Man Found In Trunk Of Car At Pennsylvania Auto Auction

McGillvary alleged he acted in self-defense following an attempted sexual assault. Prosecutors said his statements were inconsistent and also cited the victim’s extensive injuries. Galfy was found beaten to death in his bedroom, wearing only his socks and underwear.

Several days after Galfy’s death, an employee at a Starbucks in Philadelphia recognized McGillvary, and he was arrested at a bus station.

READ MORE: 17-Year-Old Shot, Critically Injured While Playing With Guns In Olney Basement, Police Say

A few months before meeting Galfy, McGillvary gained a measure of fame after intervening in an attack on a California utility worker.

Naked Man Breaks Into, Vandalizes Scranton Elementary School, Police Say

In a TV interview viewed millions of times online, he described using a hatchet he was carrying to repeatedly hit a man who had struck the worker with his car, and also fend off a further attack on two women.

MORE NEWS: Student, Brother In Custody After Shooting Near Lincoln High School Leaves Man Dead, 16-Year-Old Injured, Police Say

(©Copyright 2019 by The Associated Press. All Rights Reserved.)