A man, who was armed with an AK-47 and firing shots outside an Alabama nightclub, faces criminal charges and was being treated after a security guard shot him, authorities said.

Samuel Demario Williams, 33, was sent away from the entrance of the 3208 nightclub on Huntsville’s Long Avenue after getting into a fight with another man, according to a police report. Williams went to a vehicle, grabbed an AK-47 and started shooting as he headed back toward the club, police said.

When a security guard shot Williams in the thigh, he stopped firing the AK-47, a police officer wrote in the report. The 31-year-old security guard went inside to get a tourniquet and Williams fled the scene, authorities said.

The shootout happened shortly before 1 a.m. Monday. No other injuries have been reported.

Boosie the rapper was at the club to perform a show. In a video posted to Instagram this morning, Boosie, whose real name is Torrence Hatch Jr., described the scene.

Boosie, also known as “Boosie Badazz,” said it was like the “Wild Wild West,” with club patrons fleeing. The rapper said he was outside the club where the shootout happened.

He scolded the people involved, saying they need to “learn how to (expletive) act” at his shows.

WARNING: The following video contains language that might be offensive to some people.

Police said they captured Williams when he showed up at Crestwood Medical Center for treatment of the gunshot wound. Williams was being admitted to Huntsville Hospital and placed under arrest, Lt. Michael Johnson said.

Williams is charged with reckless endangerment and menacing, both misdemeanors, police said. But, they said those charges are preliminary and additional counts could be added. Johnson told AL.com officers are seeking a warrant against Williams, who wasn’t supposed to be carrying the AK-47 at the time of the shootout.

Although it’s generally legal to have an AK-47 in Alabama, anyone who has been convicted of a crime of violence is banned from having a gun, according to state law. Crimes of violence include murder, armed robbery and felonious assaults. Anyone who has been convicted of such offenses can be charged with a crime for having a gun in his or her possession.

Williams is a convicted felon, according to court records. He was released from prison on parole last March, court records state. He served more than 14 years after pleading guilty in Montgomery County court to six counts of first-degree robbery and two counts of felonious assault. Six other robbery charges were dismissed as part of a plea deal hatched with prosecutors in 2003, records show. Williams was sentenced to 20 years and received more than seven months of credit for time served in jail before the case was adjudicated, his court file states.

Williams was charged with promoting contraband in 2005, when authorities accused him of having marijuana in prison. In that case, he was sentenced to 15 years. The sentence was imposed to run concurrently with — at the same time as — the Montgomery case, records state.

Huntsville police said they are still investigating the shootout and Williams’ background. This morning, officers were monitoring him at the hospital.

Here’s the club where the shootout happened pic.twitter.com/IkHaTnxDcA — Ashley Remkus (@aremkus1) December 31, 2018

Updated at 12:31 p.m. with information about Williams' criminal record.