Tavion Flowers, 18, was taken into custody after school security learned he had a firearm, Sgt. Jesse Christensen said in a statement. While security staff took Flowers into the parking lot, he was detained and the .40-caliber pistol fell out of his waistband, Christensen said.
Officers responded to the school around 12:37 p.m. after the school told authorities they had recovered the handgun.
Flowers was taken to the Dane County Jail on tentative charges of felony possession of a firearm on school property, misdemeanor carrying a concealed weapon and felony bail jumping for an unrelated case, Christensen said.