The American student accused of killing 12 people and injuring another 70 in a gun rampage at a Colorado cinema could be given a truth serum if he pleads insanity, a judge has ruled.

James Holmes’s defence lawyers have hinted their client may plead not guilty ‘by reason of insanity’ later today, which observers see as a desperate attempt to avoid the death penalty.

However, Judge William Blair Sylvester said if the 25-year-old enters such a plea he may have to undergo a ‘narcoanalytic interview’ involving the serum so his mental state can effectively be assessed.

Mr Holmes faces 166 separate counts, including 12 of murder and 70 of wounding, over the shootings at the Century cinema in Aurora last July.

Hearing: James Holmes during his earlier appearance at Arapahoe County District Court in Colorado (Picture: AP)

In the original hearing in January, the court heard how the neuroscience student had planned a mass murder, bought a cache of weapons, ammunition and armour and even booby-trapped his flat.

After he enters a plea, prosecutors will have 60 days to decide whether they will seek the death penalty.

Craig Silverman, a former deputy district attorney for Denver, told Sky News: ‘Was he suffering from a mental disease or defect that rendered him incapable of distinguishing right and wrong?

‘If the defence had to prove that, that would be one thing, but here in Colorado the prosecution has to disprove it. To prove sanity beyond a reasonable doubt with James Holmes could be tough.’

Mr Silverman added that the longer the case went on, the more likely Mr Holmes was to be spared a lethal injection.