Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

David Sweat will have plenty of time to plot his next prison breakout — 3 1/2 to 7 years on top of his life without parole sentence.

That's the extra time the 35-year-old mastermind of last year's daring escape from an upstate New York maximum security prison got Wednesday from a judge.

David Sweat, New York Prison Escapee, appears in court for sentencing.

Before judge Patrick McGill acted, Sweat said he was sorry for the terror he and fellow escapee Richard Matt inflicted on the region starting June 6, when they busted out of the Clinton Correctional Facility in Dannemora, New York.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"I would like to apologize to the community, the people who felt the fear and felt it necessary to leave their homes and their community because of the escape," said Sweat, his head shaved, his ankles and wrists shackled, and dressed in green prison scrubs. "That was never my intent and I deeply apologize for that."

Sweat's lawyer told the court that, while on the lam, Sweat talked Matt out of taking hostages at one point and stopped him from shooting at one of the police officers pursuing them.

Related: Great Escapes: From 'Shawshank' to 'X-Men,' Pop Culture's Top Prison Breaks

"I would say Mr. Sweat saved some lives," his lawyer, Joseph Mucia, said in the Clinton County Court in Plattsburgh, New York. "He is remorseful ... He apologizes for the fear."

The judge didn't buy it and ripped Sweat for a lifetime of "stupid decisions" before imposing his sentence.

Sweat, who was serving a life sentence for killing a sheriff's deputy, spent more than three weeks on the lam after he and Matt shocked authorities with a sophisticated breakout straight out of "The Shawshank Redemption."

A guard stands in a tower at the Clinton Correctional Facility in Dannemora, New York. CHRIS WATTIE / Reuters

Matt, 49, who was doing 25 years to life for killing and dismembering a former boss, was killed several days before Sweat was captured in a confrontation with cops.

Sweat was also ordered to pay $79,841 for the damage he and Matt did to the facility by sawing through a steam pipe and other barriers with tools smuggled inside with the help of prison seamstress Joyce Mitchell.

Mitchell pleaded guilty earlier to aiding the escape and is now serving 7 years in prison.

Prosecutors are in the midst of plea deal negotiations with suspended Corrections Officer Gene Palmer for his alleged role in the escape.