The feds aren’t feeling much compassion for Peter Gotti.

The 79-year-old former Gambino boss begged for compassionate release earlier this summer — asking to be sprung 17 years into his 25-year sentence due to medical issues including an enlarged prostate, gastric reflux and early onset dementia.

But prosecutors think the aging mafioso still poses a “substantial danger to the community” despite his laundry list of ailments, they wrote in a letter filed Monday.

“Gotti argues that he is incapable of his violence due to his age and medical condition,” writes Assistant US Attorney Jun Xiang while insisting that argument should be rejected.

“The danger posed by a Gambino Family leader like Gotti is not that he will personally engage in acts of violence, but that he can command others to do so.”

Gotti served as the acting boss of the Gambino organized crime family from 1999 to 2002, according to court papers, and spent an estimated $70,000 on failed attempts to hunt down Salvatore “Sammy the Bull” Gravano after the turncoat landed his brother John Gotti behind bars.

A judge has yet to rule on the request.

Gotti is serving time in a North Carolina federal lockup and is slated for release in 2032.