Disgraced and defrocked Chicago priest Daniel McCormack has spent almost a decade either in prison or walking the grounds of a state mental facility after pleading guilty to molesting five boys from his Near West Side parish.

Whether he will remain — indefinitely—  under the watchful eye of state mental health workers will be decided by a Cook County judge.

McCormack in 2007 pleaded guilty to charges of aggravated criminal sexual assault tied to the five former parishioners, and has cost the Chicago Archdiocese millions in payouts to settle lawsuits brought on behalf of more than a dozen other who claim they were abused by McCormack while he served as parish priest at St. Agatha’s Church and Our Lady of West Side School.

McCormack and state prosecutors opted for a bench trial to determine whether McCormack, who finished his prison sentence on the abuse charges in 2009, is a “sexually violent person” under state law.

If Judge Dennis Porter finds that McCormack has a mental disorder to go along with his criminal conviction, and is likely to molest children again if released, the 48-year-old ex-priest will remain at a state facility in downstate Rushville.

Wednesday, his hair close-cropped and wearing an ill-fitting gray-blue shirt, McCormack sat slouched back in a chair beside his lawyers, as a state forensic psychiatrist testified that McCormack was a pedophile, and so sexually fixated on young boys that he continued to molesting children even after he was arrested in 2005 and church leaders assigned someone to monitor him.

Psychiatrist Angeline Stanislaus said McCormack refused to answer questions when she tried to evaluate him for the state in 2009, so she was working from police investigative reports and reports by investigators for the archdiocese. McCormack also did not submit to interviews from experts hired by his own lawyers.

“Even though he had been under the eye of his supervisor at the church and has been arrested, people are looking at him, he continued to engage in this behavior,” Stanislaus said.

“All this indicates that (pedophilia) has effected his volitional capacity to control himself.”

Lawyers for McCormack questioned the arcane actuarial computation of the ex-priest’s makeup that a psychiatrist would use to determine whether McCormack, years later, is likely to molest other children.

Stanislaus was the sole witness called by state prosecutors, who rested their case Wednesday. Lawyers for McCormack have said they will put a pair of experts on the stand to refute Stanislaus’ testimony when the trial resumes on Thursday.

The trial is slated to end as soon as Friday.

On Wednesday, the courtroom was nearly empty, save for a few law students and lawyers for the archdiocese.

More than 400 people are in state custody as sexual violent persons, a list that includes so-called “Plumber Rapist” Brad Lieberman and former Joliet-area priest Fred Lenczycki.