A man who spewed so many profanities in court that a judge threatened to have his mouth shut with duct tape read a book and ignored the judge Wednesday while sitting in handcuffs and leg shackles for his sentencing hearing.

That didn't prevent Alan McCarty Jr. from being sentenced to 20 years in prison for threatening Circuit Judge Stasia Warren — and an additional 10 days for contempt of court because of his outbursts.

McCarty, 36, didn't stay quiet for long. After Circuit Judge Matt Foxman stated that McCarty had threatened the unborn child of a prosecutor during his trial, McCarty exploded.

“What a bunch of (expletive) lies you stupid piece of (expletive)," McCarty screamed at Foxman during the hearing at the Justice Center in Daytona Beach. "You threatened my life, (expletive, expletive). (Expletive) you, you (expletive, expletive).”

At that, Foxman ordered McCarty removed from the courtroom. Deputies had to drag him away as he continued screaming expletives at the judge and assistant state attorney.

He spent the rest of the hearing in a small room behind the courtroom where he could hear the proceedings over a speaker and watch through one-way glass. That's where McCarty spent much of his trial. He continued screaming, loud enough to be heard through the glass, which trembled at one point as something struck it.

[Volusia judge warns man if he doesn’t behave his mouth will be duct-taped]

McCarty, who before his arrest lived in Milton in Santa Rosa County, was found guilty by a jury in August of two counts of threats or extortion and two counts of corruption by threat against a public official for threatening Warren and dispatchers who answered his call when he called 9-1-1 to rail about Warren.

[Milton man accused of threatening Volusia circuit judge.]

[Profane suspect who threatened to kill Volusia judge found guilty]

McCarty threatened Warren because he said his kids had been taken away from him. But Foxman noted on Wednesday that Warren was not even the judge who made the decision in the custody case and that McCarty didn’t even have custody of the children to begin with.

McCarty even cursed and insulted his own assistant public defender, Ryan Belanger. Belanger said that while McCarty's mother was in the courtroom she did not wish to speak but did want to apologize to everyone for her son's behavior.

That behavior included McCarty inviting Foxman during the trial to perform oral sex on him, to which the judge said “I prefer not to.” Foxman brought that comment up again on Wednesday as he cited the reasons for the contempt of court conviction.

"You also offered me to perform a sex act upon you, which I politely declined and still do to this day for whatever that's worth," Foxman said.

The extra 10-day sentence means McCarty will not be eligible to be housed at a work release or community release center while in prison, corrections officials said. Once McCarty finishes his prison sentence, he will then serve his 10-day county jail sentence.

State Attorney R.J. Larizza said in a statement that McCarty's 20-year sentence will give him "ample time to reflect on the serious nature of his threats against the judge and our judicial system."