The second gunman who allegedly opened fire on classmates at a Denver High School appeared in court on Wednesday.

Alec McKinney has been accused of killing one classmate and injuring eight others alongside his friend Devon Erickson at STEM School Highlands Ranch on Tuesday.

Authorities described McKinney as a female juvenile named Maya after initially identifying the second gunman as a boy based on appearances.

But friends of McKinney have confirmed that the teen identified as a male and preferred to be called 'Alec'.

The second gunman who allegedly opened fire on classmates at a Denver High School has been identified as Alec McKinney

McKinney has been accused of killing one classmate and injuring eight others alongside his friend Devon Erickson at STEM School Highlands Ranch on Tuesday. They are pictured here together at prom just a month ago

McKinney is reportedly in the process of transitioning from female to male, but Sheriff Tony Spurlock would not confirm if the young suspect was transgender.

'Right now we are identifying the individual as a female, because that's where we're at,' he said. 'We originally thought the juvenile was a male by appearance.'

When McKinney appeared in court on Wednesday, his attorney said he preferred the pronoun 'he', according to CBS Denver.

McKinney waived the reading of formal charges. He is being held without bond. Erickson also didn't enter a plea and was ordered to return to court on Friday.

Friends of McKinney revealed more details of the teen on social media, fighting back against authorities' decision to identify him as a woman and revealing that he was struggling with mental health issues.

'Nothing that Alec and Devon did can be condoned, and they can't be defended. Their actions were terrible. But Alec is not a girl,' one friend wrote on her Instagram story.

Erickson, 18, covered his face with his streaked purple hair when he made his brief court appearance on Wednesday dressed in a red prison jumpsuit and handcuffs

Erickson was earlier charged as an adult with first-degree murder and attempted murder over the shooting on Tuesday afternoon

'He at least deserves that respect. And I am so deeply sorry to anyone affected by their actions. Things like this can be prevented and they aren't. This is not okay.'

That same friend later took to McKinney's Instagram page and revealed both he and Erickson had been troubled.

'Devon did not do what he did because he's a liberal, or to make a statement,' she wrote. 'He did it due to internal struggles. They're both struggling with mental health issues and this is a time for awareness.'

'Alec did not do this because he's trans, but had people supported him in the way that he needed and deserved, he would not have struggled so much that he got pushed over the edge.'

Friends of McKinney revealed more details of the teen on social media, revealing that he was struggling with mental health issues. He is pictured here at prom last month

One friend took to her Instagram story to confirm that McKinney identified as a man as she spoke out about the shooting

'They did a horrible thing, but please, please recognize that mental health awareness is important. Supporting LGBT youth is important. They didn't get the help they needed, and they NEEDED it.'

The friend said she knew both McKinney and Erickson personally and said they didn't shoot their classmates 'out of hatred toward others'.

'It was hate in themselves,' she continued. 'And they needed support and they didn't get it and that could have a lot to do with how this ended up. The way that they felt is not an excuse for what they did. But I firmly believe that if they had gotten the help that they desperately needed, their state would not have progressed this far.'

Another friend who took to McKinney's Instagram comments said the teen was 'really sweet and selfless'.

'It's hard for me to accept that he did this so ofc it's hard for me to see these comments (sic).'

McKinney and Erickson are seen here at prom together just a month before the shooting

That same friend who posted about McKinney on her story later took to McKinney's Instagram page and revealed both he and Erickson had been troubled

The friend said she knew both McKinney and Erickson personally and said they didn't shoot their classmates 'out of hatred toward others'

The friend said she believed the shooting would never have happened if both teens 'had gotten the help that they desperately needed'

'You need to understand that there are people that knew him for him before he shot a school. What he did was selfish, but I know that for the longest time he wasn't.'

A third friend called McKinney a 'loving and selfless individual' who 'wanted nothing but the best for others'.

Kendrick Castillo, 18, died on Tuesday afternoon while trying to take down one of the shooters

'Unfortunately from the lack of help he was given or that he accepted, he reached his breaking point,' they added.

'The Alec I knew was a genuinely loving person who couldn't have loved his friends any more than he did. No one would have guessed in a million years he was capable of doing this, but he did.'

'Anyone can do the unthinkable when pushed too far. I am by no means trying to condone his actions, I'm trying to get the point across that this could happen to anyone and that we all need to make sure we help or friends/family personally.'

Erickson was charged as an adult on Wednesday with first-degree murder in the death of 18-year-old Kendrick Castillo, who was just three days away from graduating high school.

He also faces dozens of attempted murder counts and was ordered held without bond at Douglas County Jail.

Classmates said Castillo was among a group of three students who tried to take down one of the shooters by tackling them when they stormed the classroom.

Witnesses said two gunmen stormed two classrooms and opened fire with handguns that were concealed in a guitar case.

Eight students suffered gunshot wounds in the shooting and three of them remain in intensive care in hospital. Five had been discharged from the hospital by Wednesday morning.

Authorities have not yet released a motive for the shooting, which occurred just miles from the scene of the deadly 1999 Columbine High School massacre.

The shooters went into the school through an entrance without metal detectors, according to police.

Devon Erickson, 18, has been identified as one of the two suspects who allegedly opened fire on STEM School Highlands Ranch in Colorado on Tuesday afternoon

They were arrested within minutes after administrators reported the gunfire.

Sheriff Spurlock said officers engaged the suspects and there was a struggle to bring them down but neither suspect was injured in the confrontation.

Joshua Jones (pictured in an undated photo) was shot twice while disarming one of the attackers on Tuesday

Authorities recovered three handguns and a rifle but said the latter was not used in the shooting. The two students were not old enough to buy or own the handguns.

Student Nui Giasolli was in her British Literature class when Erickson came in late.

'He walked to the other side of the classroom where we also had another door and he opened the door,' she told the Today Show. 'He walked back as if he was going to go back to his seat, then he walked back to the door and he closed it. The next thing I know he's pulling a gun and he's telling nobody to move.'

Giasolli said another student lunged at the shooter, giving his peers time to dive under the desks and flee to safety.

'To be some of the kids that were brave enough to bring him down so that all of us could escape and all of us could be reunited with our families,' she said. 'They were very heroic. I can't thank them enough.'

Josh Dutton, 18, told The Associated Press that he was close friends with Devon Erickson in middle school but hadn't seen him for four years as he went to a different high school.

Terrified students were evacuated from the school after shots were fired at 1.53pm on Tuesday

Students and teachers hold their hands in the air as they exit the scene of the shooting

On Sunday, he spotted Erickson at a local light rail station and said he was shocked at how much his friend had changed.

Erickson wore all black, a hat and sunglasses, was significantly skinnier and didn't seem interested in talking.

'He said he'd just turned 18 and he owned rifles,' Dutton said.

Hundreds of people took to Twitter after news of the shooting broke to express their horror that yet another American school had been targeted.

The shooting is the 43rd incident of gunfire reported on a school campus so far in 2019 and the 116th mass shooting overall this year.

The STEM campus is located just seven miles from Columbine High School, where 13 people were killed and more than 20 were injured on April 20, 1999 - just over 20 years ago.

A number of students alleged on the STEM School Highlands Ranch's Google reviews that the school had issues with bullying, including one user who shared the same first name as Erickson (pictured)

The shooting is the 43rd incident of gunfire reported on a school campus so far in 2019 and the 116th mass shooting overall this year

A number of students alleged on the STEM School Highlands Ranch's Google reviews that the school had issues with bullying, including one user who shared the same first name as Erickson.

The user, who called himself 'NotSoFantasticDevon', said he was 'literally assaulted' on campus and that faculty did nothing about it.

'The dean of students made us delete the video of the kid attacking me, and they then proceeded to suspend me for half a day,' read the review, which was posted six months ago.

'Then they told me I was bullying the kid even though I had a list of over 10 people who saw it happen and knew I wasn't bullying the kid. Just do yourself a favor and don't let your kid go here.'

One student claimed the school does not provide 'any support to students with confirmed mental illnesses'.

'Additionally, bullying is a huge problem at the school. It often seems that the problem isn't even being addressed by the people who run the school, other than to milk it for money by selling "anti-bullying" fundraiser stuff, while ignoring the problem in their own halls,' they added.

Another student claimed that '99.9 percent' of all students at the school are 'depressed/bullied/insecure' but the 'office does nothing'.