Profile: Aurora cinema shooting suspect James Holmes

James Holmes with orange hair
James Holmes seen during his first court appearance on 23 July 2012

Before he allegedly shot 12 people dead at a cinema in Aurora, Colorado, James Holmes was considered a quiet young man.

The 25-year-old had been studying for a PhD in neuroscience at the University of Colorado at Denver, although he was about to quit.

"He basically was socially awkward, but not to the degree that would warrant suspicion of mass murder or any atrocity of this magnitude," said Billy Kromka, a research assistant at a lab where he spent several months last summer.

The FBI said he had no significant criminal record - local police said he had a speeding ticket from 2011 - and no links to terrorism.

Mr Holmes now faces more than 160 charges over the killing of 12 people and wounding of 58 at a midnight showing of the new Batman film.

He was born on 13 December 1987 in San Diego County, California, where he spent at least part of his childhood.

In 2006, he graduated from Westview High School in the upmarket district of Torrey Highlands, where his parents still live. A yearbook showed he had played football for the school's junior varsity, or "B" team.

A former classmate, Breanna Hath, said Mr Holmes was extremely quiet, "really sweet, shy" and "didn't have any creepy vibe about him at all".

"There were no real girls he was involved with," she told the Washington Post. "It seemed he was really into a video game group that hung out together."

Intellectually gifted, Mr Holmes won a scholarship to study at the University of California at Riverside, where he gained a bachelor's degree in neuroscience in 2010.

"He had the capability to do anything he wanted academically," Timothy White, the university's chancellor, told reporters on Friday.

After graduation Mr Holmes returned to San Diego, where he is said to have struggled to find a job. Eventually, he got part-time work at McDonald's.

James Holmes in court on 4 June 2013

In June 2011, Mr Holmes enrolled in the doctoral programme at the University of Colorado at Denver and moved into an apartment building near the Anschutz Medical Campus in the eastern suburb of Aurora.

In his application to rent the apartment, he described himself as "quiet and easy-going", according to the Denver Post.

Gabriel Macias, another resident who works a nearby factory, said Mr Holmes was "always wearing camouflage pants and a hat".

"We did not know him well because he talked to nobody. He was always locked up behind his door," he told the AFP news agency.

Lab colleague Billy Kromka said he had been one of the quieter people, and had spent much of his time immersed in his computer, often participating in role-playing online games.

Robert and Arlene Holmes have attended many of their son's court hearings

By the spring of 2012, Mr Holmes had begun to struggle with his studies and failed a key exam.

He also was the patient of Dr Lynne Fenton, a university psychiatrist, whom he sent a notebook days before the attack.

The notebook never reached Dr Fenton, but US media reports have said it includes drawings of a violent attack.

Prosecutors have said the doctor-patient relationship ended in June, weeks before the shooting.

His defence lawyers have said they believe he is mentally ill, but have dropped a request to examine the notebook in order to move the hearing process along.

His supervisors had planned to give him remedial instruction, an unnamed faculty member told the Washington Post, but he instead decided to end his studies in early June. The university confirmed he had been "in the process of withdrawing".

In the 60 days leading up to the cinema attack, Mr Holmes legally bought four weapons at local gun shops - an AR-15 semi-automatic rifle, two .40-calibre Glock handguns and a 12-gauge Remington shotgun.

Chief Dan Oates of Aurora police said the accused had also purchased more than 6,000 rounds of ammunition on the internet, including 3,000 rounds for the assault rifle, 3,000 for the Glocks and 300 for the shotgun.

In June, the owner of a gun range rejected Mr Holmes' application after hearing a "bizarre - guttural, freakish" message on his voicemail.

A broken window at the apartment where James Holmes lived. It was booby trapped to go off when someone entered

On 20 July, the suspect was arrested in the car park of the Aurora multiplex cinema where the shootings were carried out.

He was said to have been in possession of several firearms, and to have surrendered without incident.

Mr Holmes' hair had been dyed red in an apparent reference to the Joker, a Batman villain.

He appeared dazed in his first court appearance, and cameras were banned from further hearings.

Aurora police would not discuss any motive for the attack, and a gag order has limited evidence available to the public.

Mr Holmes is accused of booby-trapping his apartment with explosive chemical and incendiary devices linked by wires, intended to distract emergency responders from the cinema shooting.