A group of convicted sex offenders who tried to collect a huge payday from former Gov. George Pataki and other officials over the state’s controversial “civil confinement’’ policy was shot down today.

A jury ruled that the pervert plaintiffs’ civil rights weren’t violated when they were locked up in the nuthouse even after their prison sentences ended.

The five sex offenders and the estate of a sixth were seeking $10 million apiece over Pataki’s controversial 2005 decision to sidestep recalcitrant state lawmakers and order “civil confinement” of more than 100 convicted sex offenders to psychiatric centers after prison.

The ex-cons were evaluated by a state panel of shrinks after prison and had no recourse when they were ordered to be kept confined.

A state court deemed the practice was illegal a year later.

The sex offenders sued Pataki and three other current and former officials in 2008, alleging the honchos had abused their powers by denying them their freedom.

Pataki’s lawyer hailed yesterday’s verdict beating back the claim.

“While governor, [Pataki] sought to ensure the safety of all New Yorkers and make sure that they were well served by their government. He achieved this by keeping the law and the constitution priorities all the time,’’ said his lawyer, Abbe Lowell.

“The jury verdict today confirms this. He should be thanked for all he did, and we are gratified by the result.”

Of the four defendants, only Sharon Carpinello, a former commissioner of the state Office of Mental Health, was found viable of any wrongdoing — and it was a meager victory for the plaintiffs.

The eight-person jury determined that Carpinello should shell out a mere $1 to each of the six plaintiffs after being held liable on a “procedural due process” claim.

“We had different opinions, but we were able to resolve them amicably,” said one jury member.

The jury — which consisted of seven women and one male — spent two days in deliberations after testimony concluded in Manhattan federal court on Monday.

During the trial, two of the plaintiffs revealed under oath that their deviant sexual urges continued even after prison.

Charles Brooks, who spent nearly four years at psych facilities after serving six years for sexually abusing a 5-year-old girl, admitted that he once was reprimanded at Manhattan Psychiatric Center for masturbating in front of a nurse.

And Kenneth Bailey, who spent four years in the loony bin after doing nine years behind bars for sexually abusing his 9-year-old daughter, said he still fantasizes about children “from time to time.’’

Bailey has also admitted to molesting more than 20 young girls over the years.

Pataki, who was not in court today, had testified that he pushed for the policy after his own family was exposed to such a perv.

He recalled that in the mid-’90s, he was walking in a state park with his wife, young son and friends when he noticed a suspicious man near the kids. He later learned that the man was a convicted sex offender