One-time Internet sensation “Kai the Hatchet-Wielding Hitchhiker” was sentenced Thursday to 57 years in prison for beating a prominent New Jersey lawyer to death in 2013.

Caleb “Kai” McGillivary, 30, was found guilty last month of first-degree murder for killing 73-year-old Joseph Galfy in his home after a sexual encounter gone wrong.

The fatal beatdown happened three months after McGillivary shot to viral fame for giving a bonkers TV-interview where he described using a hatchet to save a Fresno, Calif., worker from assault.

The original video of the interview was viewed more than 7 million times on YouTube.

It took a jury less than two days to find McGillivary guilty of the beating, following a three-week trial that included a slew of outbursts from the defendant.

McGillvary will get credit for the six years he spent in jail awaiting trial and will be eligible for parole in 2061, NJ.com reported.

Union County Superior Court Judge Robert Kirsch cited McGillivary’s unstable lifestyle, substance abuse and lifelong anti-social behavior when explaining the decades-long sentence.

“You are crafty, cunning, disingenuous and manipulative,” Kirsch told McGillvary. “You are a powder keg of explosive rage.”

Prosecutors said McGillivary was hitchhiking across the country when he met Galfy by chance at Times Square.

The attorney invited the then-24-year-old back to his Jersey home for a seemingly innocent encounter that ended with Galfy suffering a broken neck, shattered ribs, skull fractures and several contusions.

He was found facedown in bed wearing only his underwear and socks.

The defense argued that the kooky drifter passed out after being drugged and that he woke up to find the older lawyer pulling down his pants. He told authorities he hit Galfy and fled.

When McGillvary gave a statement in court, he said he’d met “tens of thousands of people” during his travels and had never hurt them.

“The hundreds of people I’ve stayed with … now question ‘Why didn’t Kai hurt us?’ because this trial didn’t answer those questions, but my character does,” McGillvary said, his voice raised. “My character for helping people is why people were safe with me.”