MIDDLEBURY — An Addison County man who has already spent half of his life in jail was sentenced to 20 years to life behind bars Thursday for sexually assaulting a 12-year-old girl.

Leo Pratt, 46, who in 1984 grabbed a gun and tried unsuccessfully to shoot it in a Burlington courtroom presided over by Judge Frank Mahady, was sentenced Thursday in a Middlebury courthouse bearing the late judge’s name.

Two Addison County sheriff’s deputies stood guard behind Pratt’s chair at the defense table throughout the 3½-hour proceeding.

A jury found Pratt guilty last year of aggravated sexual assault against a girl at his Panton home in November 2012.

Pratt, who did not speak during his sentencing Thursday, maintained his innocence, and his lawyer, Brian Marsicovetere, told the court his client planned to appeal the conviction.

The aggravated sexual assault charge carried a minimum 10-year sentence, but Deputy State’s Attorney Dennis Wygmans argued that Pratt should serve a minimum of 40 years due to the severity of the offense and his extensive criminal history.

Pratt has served a total of 23 years in jail on 15 misdemeanor and eight felony convictions.

Christina Barrows, a state Probation and Parole officer, told the court Thursday that the 12-year-old wasn’t Pratt’s first sexual assault victim.

Barrows said Pratt was convicted in 2009 of prohibited sexual acts involving a person in Hardwick. And she said the state Department for Children and Families confirmed a sex abuse complaint filed by a victim in Waterbury in 2010.

Pratt was never charged criminally for the 2010 abuse, she said.

Barrows also told the court that since 1990, Pratt has amassed 111 disciplinary complaints in Vermont jails including nine since he was incarcerated in November 2012.

In addition, she said Pratt has thus far refused to acknowledge his offense, thereby making him ineligible for the sex offender treatment he must complete before he could be released from jail.

Barrows said her agency, like the prosecution, recommended a sentence of 40 years to life.

“There were three victims. We’re not talking about one incident with one person,” she said.

The teenager Pratt assaulted didn’t appear in court Thursday. But the girl’s lawyer, Pam Marsh, read a letter penned by her client.

“What he did to me really impacted my life,” Marsh read.

“He was supposed to keep me safe and out of harm’s way.”

The prosecutor argued that every time Pratt has been released from jail he has broken the law, leaving a trail of victims in his wake.

“Mr. Pratt is a danger to the public and will remain so for the foreseeable future,” he said. “Forty years might seem like a long time, your honor, but Mr. Pratt has earned every day of it.”

But Marsicovetere argued that 40 years was not only excessive but the equivalent of a life sentence for Pratt, who is in poor health and unlikely to live another 40 years.

And he argued that the public’s safety wouldn’t be served by handing down such a severe punishment because of the message it would send to other offenders unable to control their sexual impulses.

Marsicovetere, who asked the judge to impose a 14-year-to-life sentence, said those offenders would still be driven to sexually assault their victims — but they might not leave them alive for fear of facing a lengthy sentence if caught.

“What’s the message for those who can’t control their impulses?” Marsicovetere said. “What is there to deter murder? Is that what’s going to happen when you’re handing out life sentences in cases where someone hasn’t died?”

In the end, Judge Robert Mello decided that a two-decade minimum sentence — with credit for the 1½ years Pratt has already been incarcerated — punished Pratt while giving him a chance to turn his life around.

“Obviously this is a very serious offense,” Mello said.

“But it doesn’t warrant life at a minimum and maximum with no hope of rehabilitation. There’s always a possibility that he will change his mind, acknowledge what happened here and avail himself of treatment.”