Updated

James Holmes, the man who killed 12 people during a midnight showing of a Batman movie in Aurora, Colorado, in 2012, did what he did due to a range of factors "in an unimaginably detailed and complex confluence," according to a psychiatrist who interviewed Holmes for hours.

"A big part of it is, it's hidden in Holmes' mind, and he can't see it either," William H. Reid told The Associated Press about his new book, "A Dark Night in Aurora: Inside James Holmes and the Colorado Mass Shootings."

TRUMP ON PREVENTING MASS SHOOTINGS: 'WE'RE GOING TO GET IT DONE'

Reid, one of two court-appointed psychiatrists who interviewed Holmes in the summer of 2015, said society will never fully understand why the gunman did what he did.

Holmes killed 12 people and wounded 58 others at the showing of "The Dark Knight Rises" on July 20, 2012. Twelve people also were hurt as they escaped the chaotic scene.

Holmes was convicted of murder and sentenced to life in prison without parole in 2015.

aurora shooting ap

In this July 27, 2012, file photo, crosses are displayed in honor of the victims of the Aurora, Colo., movie theater shooting, which killed 12 people and injured 70. (AP Photo/Ted S. Warren, File)

Reid admitted that his answer for why Holmes opened fire was "not very satisfying" because it "lies in an unimaginably detailed and complex confluence that we can't replicate because we can't see all of it."

He said that several factors that may have contributed to Holmes' murderous state of mind could be detected, including the killer's mental illness and the way his personality shaped his awkward interactions with other people and influenced his view of the world.

HOW PREVALENT IS MENTAL ILLNESS IN MASS SHOOTINGS?

The author added that the ups and downs of Holmes' life as he struggled in graduate school at the University of Colorado in Denver and his break-up with his girlfriend were other known factors. However, many remain unknown, according to Reid, "because no one knows his entire social and genetic and biological life."

Reid said Holmes suggested he might kill again if given the chance, but told the news wire he doubted Holmes was a serious threat to other prisoners.

james holmes ap

In this Aug. 26, 2015, file photo, Colorado theater shooter James Holmes, right, is led out of the courtroom after being formally sentenced in Centennial, Colo., to serve life in prison without parole. (RJ Sangosti/The Denver Post via AP, Pool, File)

Reid, along with the other court-appointed doctor, Jeffrey L. Metzner, concluded Holmes didn't meet Colorado's standard for insanity, but said the gunman was mentally ill at the time of the shooting.

Metzner diagnosed schizoaffective disorder, a severe form of schizophrenia, and Reid found schizotypal personality, a related but less severe disorder. Both said that despite his illness, Holmes knew his elaborately planned ambush was illegal and morally wrong, and that he could still form criminal intent, all of which meant he was sane under state law.

Fox News' Nicole Darrah and The Associated Press contributed to this report.