A tearjerking mob sob story paid off big for a rickety Colombo soldier in Brooklyn federal court Thursday.

Octogenarian racketeer Nicky Rizzo, 86, listed a painful string of ailments at his sentencing — from bladder and prostate cancer to a bleeding cast on his leg to memory and hearing loss to anxiety and depression.

The hunched Brooklyn native — who slowly shuffled into court and groaned throughout the proceeding — even interrupted the sentencing to empty his colostomy bag. “It’s getting full again,” he wheezed to a slightly irritated Judge Kiyo Matsumoto.

But despite the protests of skeptical prosecutors who sought out a maximum of two years in prison, Matsumoto took mercy on the geriatric goon and gave him six months in a medical facility.

Born when Babe Ruth was still in his prime for the Yanks in 1927, Rizzo had remarkably managed to elude arrest despite his long history as a Colombo soldier until finally getting busted for loan sharking and extortion in 2011.

The World War II vet and former boxer made millions during his decades of low-key criminal activity through illegal and legitimate ventures.

In rendering her sentence, Matsumoto said she took into account a “uniqely tragic and moving” string of misfortunes in Rizzo’s life, including the ugly deaths of all three of his children.

A daughter died of a drug overdose, one son died after getting hit with a baseball bat and another boy fell down an elevator shaft.

His attorney, Joseph Mure, told Matsumoto that Rizzo’s only remaining family was his grandson Lenny. The mafioso took custody of the boy at 11 when his mother passed away and raised him in their modest Brooklyn home where they remain roommates.

Now a New York City schoolteacher, Lenny appeared in court yesterday to support his aging grandpa.

“He sits by the window,” Mure said of his fading client. “He waits for hours and hours for him to come home.”

But prosecutor Allon Lifshitz pushed back against Rizzo’s tale of woe and reminded Matsumoto that he had used violence and the threat of violence to clear six figures a year as a mafioso.

He was forced to cough up $600,000 grand in restitution after his arrest.

The prosecutor was particularly irked when Rizzo asked to turn himself in after Lenny’s November wedding. “When is it going to end?” he asked. “You pleaded guilty two years ago.”

“The shuffling into the courtroom, the groaning, that’s a joke,” Lifshitz said. “There is no suggestion that this is someone close to death.”

But Matsumoto went easy on the old man with the checkered past.

“Thanks Judge,” Rizzo muttered before resuming his shuffle out of the courtroom with Lenny right behind him