Guard at Colorado school shooting may have shot at deputies, wounded student amid chaos: Source Two gunmen, both students, opened fire at the Highland Ranch school on Tuesday.

An armed security guard at a Colorado school may have mistakenly fired on sheriff's deputies and wounded a student amid a highly chaotic shooting rampage at the campus this week, authorities told ABC News on Thursday.

Investigators are probing the security guard's actions during the chaos that broke out Tuesday afternoon at the Highlands Ranch STEM School when two students allegedly opened fire on classmates, killing one student and injuring others, a law enforcement official with knowledge of the investigation told ABC News.

Detectives are trying to determine if gunshots directed at Douglas County Sheriff's deputies responding to the scene were mistakenly fired by the security guard, whose name has not been released, and whether the guard shot and wounded a student during the episode, a law enforcement official said.

The source cautioned that the investigation is in the early stages and investigators are speaking with the security guard to determine all the facts.

A Douglas County Sheriff’s Department spokeswoman would not comment, citing the ongoing investigation.

At a news conference on Wednesday, Douglas County Sheriff Tony Spurlock said the security guard restrained one of the shooting suspects until deputies arrived.

The school’s security officer is employed by BOSS High Level Protection.

The twist in the investigation was first reported by NBC affiliate station KUSA-TV in Denver.

Grant Whitus, chief executive officer of Boss High Level Protection, told ABC News on Thursday that the guard was interviewed by investigators for about an hour following the shooting and was released. He declined to elaborate on what the guard told investigators.

He said the guard has not been interviewed since.

Whitus said his security guards are armed with 9mm handguns and follow the same rules of engagement as law enforcement officers: Guards may only discharge their weapons in the event of an imminent threat of life.

Just before 2 p.m. local time on Tuesday, a pair of alleged gunmen, both students at the school, opened fire at the STEM School in Highlands Ranch. An 18-year-old student, identified as Kendrick Castillo, was shot to death when he charged one of the gunmen inside a classroom in an attempt to stop the shooting, police and witnesses said.

Castillo and another student were able to disarm one of the alleged shooters and pin him to the ground, fellow student Brendan Bialy told ABC News.

"There was no questioning. There was no hesitation. There was no looking around," Bialy, 18, said of Castillo.

Both suspects appeared in court Wednesday afternoon. The adult suspect, 18-year-old Devon Erickson, has been charged with murder. The other suspect, a juvenile, has not been identified and any charges against him are not yet known.

Police have yet to comment on a motive for the shooting.

The shooting happened less than 10 miles from Columbine High School, where on April 20, 1999, two gunmen, Eric Harris and Dylan Klebold, shot and killed 12 classmates and a teacher.