Police in Colorado Springs announced that 5 were killed and 18 injured in a shooting at a gay nightclub in the city, located in the US state of Colorado.

The attack took place during the nightclub's celebration of the Transgender Victims' Memorial, an event held annually on November 20 to commemorate those killed in acts of violence resulting from so-called "transphobia".

A suspect has been taken into custody and is being treated for injuries after the attack at the club known as Club Q, Colorado Springs Police Officer Pamela Castro told a news conference.

She added that the police received the initial report by phone just before midnight last night, local time, about the shooting, explaining that the security forces were able, once they reached the site, to identify a person inside the club believed to be the suspect.

It did not provide any information about the motive behind the attack, and also declined to disclose the type of firearm used in the shooting.

Club Q categorizes itself on Google as a "gay nightclub".

Pictures after the shooting showed security and emergency vehicles parked on a street near the scene.

By 4 a.m. (11 a.m. GMT), police had sealed off the area around the club, which is located in a major shopping center on the outskirts of Colorado Springs.

And in 2016, a gunman killed 49 people at a gay nightclub in Orlando, Florida, before the police shot him dead.

The attack, at the time, was the worst mass shooting in modern US history.