Image copyright Getty Images Image caption Both suspects are now in custody

A teenager has been killed and seven others injured after two pupils allegedly opened fire in a US school.

The attack at the STEM School Highlands Ranch, near Denver, Colorado, took place on Tuesday, police said. Both attackers have now been arrested.

Highlands Ranch is just 8km (5 miles) from Columbine High School - the site of one of America's most notorious school shootings 20 years ago.

This is believed to be the 115th mass shooting in the US in 2019.

The STEM - science, technology, engineering and math - school is a charter school in an affluent suburb.

Image copyright The Denver Post via Getty Images Image caption A school staff member comforts a child after the shooting

What happened?

Just before 14:00 local time (20:00 GMT) the attackers "walked into the STEM school, got deep inside the school and engaged students in two separate locations", Douglas County Sheriff Tony Spurlock said.

During a news conference on Wednesday, Mr Spurlock said the two came in through an entrance at the STEM's secondary school that did not have a metal detector.

Both suspects were pupils at the school.

Police initially misidentified the younger one as male, based on her appearance, but clarified on Wednesday that that suspect was female.

The other suspect has been identified by police as 18-year-old Devon Erickson, who is due to appear in court on Wednesday.

One student at the school told CBS News Mr Erickson had talked about causing harm and sadness.

Image copyright Facebook, courtesy of Devon Erickson Image caption Devon Erickson, 18, has been named as one of the suspects

"I always thought he was just messing around and stuff, but sometimes he did hint at it here and there," Michael Schwartz said.

Mr Spurlock said the school contacted the emergency services "almost immediately", and that officers arrived at the scene about two minutes later.

After a "struggle", the suspects were taken into custody, Mr Spurlock said.

The school was closed and placed on lockdown as police attended the scene. It was eventually lifted an hour later, at about 15:00 local time (21:00 GMT).

Eighteen-year-old Kendrick Castillo - who was to graduate this month - was identified as the student killed in the attack.

Image copyright CBS Image caption Kendrick Castillo, 18, was killed in the shooting at his school

A handgun was later recovered at the scene.

"We have no information about anyone being targeted," Mr Spurlock said, adding that it was too early to come to any conclusions.

Authorities have issued search warrants for both of the suspects' homes.

One parent, named in local media as Fernando Montoya, said his 17-year-old son was shot three times and wounded.

Image copyright Reuters/Courtesy Shreya Nallapati Image caption Students and staff wait outside near the STEM School during the shooting

"He said a guy pulled a pistol out of a guitar case and started to shoot," Mr Montoya told ABC affiliate Denver 7.

According to Mr Spurlock, there were 1,800 children at the STEM school during the attack, and around 600 "were almost definitively affected by it". Police are currently working on interviewing those students.

The school did not have a school resource officer (SRO) from law enforcement, but had contracted with a private company to have an armed guard monitor the campus, the sheriff said.

What has the reaction been?

Colorado Governor Jared Polis tweeted he would send extra police officers to the scene.

The White House also tweeted its condolences to the victims, while spokesman Judd Deere said President Donald Trump "has been briefed and continues to monitor the ongoing situation".

And another parent Steve Holley tweeted that he had been here before.

"This is the third time I've had to pick up my boys from school due to a lockdown," he wrote.