In an order issued late Friday, Arapahoe County District Judge Carlos Samour wrote the entry of a police robot into the apartment was legal because of the danger explosives found inside posed to the neighborhood.
The order is the latest rebuff to defense attorney's efforts to keep evidence against Holmes from being heard at trial, the Denver post reported Monday.
"Had investigators not taken the immediate threat of explosives in the defendant's apartment seriously, they would have been derelict in their duty to protect the public and first responders," Samour wrote.
Police later obtained a warrant to search the apartment more thoroughly, the newspaper said.
Twelve people were killed and dozens more were wounded when a gunman opened fire in an Aurora theater in July 2012. Holmes has pleaded not guilty by reason of insanity. Prosecutors are seeking the death penalty.
Swim Week Miami Beach 2014 [PHOTOS]