A Milwaukee police officer who killed a black man in August fired the fatal shot after the man had thrown away his gun, according to court documents released on Thursday.

The documents reveal for the first time that Dominique Heaggan-Brown is charged with reckless homicide in the 13 August shooting death of Sylville Smith, which sparked two days of riots.

Heaggan-Brown, who is also black, shot Smith following a traffic stop on the city’s north side. According to a criminal complaint, Heaggan-Brown and another officer chased Smith on foot after he fled from the car. The officers’ body cameras show Smith was carrying a semi-automatic pistol.

Smith fell, got back to his feet with the gun still in his hand, turned toward the officers and raised the gun, according to the complaint. Heaggan-Brown fired a single shot, striking Smith in the arm. The video shows that Smith then threw his gun over the fence. Heaggan-Brown then shot him in the chest, the complaint says. The two shots occurred in less than two seconds of each other. After the second shot, Smith appeared to reach toward his waistband but the body camera footage shows at the time of the second shot Smith was unarmed.

Milwaukee County district attorney John Chisholm did not announce the charge and it is not clear when Smith was charged. Chisholm’s office said he would not hold any news conference or issue any statement on Thursday on the charge. An initial appearance is scheduled for Friday. Heaggan-Brown was fired in October over a separate case that involved allegations of sexual assault.

Police chief Ed Flynn said shortly after the shooting that the incident began when police stopped a suspicious rental car. Smith bolted from the vehicle and ran through a residential neighborhood. Heaggan-Brown gave chase and opened fire after Smith turned toward the officer and began to raise his gun despite Heaggan-Brown’s warnings to drop it, Flynn said.

The neighborhood where Smith was killed is predominantly black. Heaggan-Brown grew up there and has lived near the shooting scene since at least 2012.

Police didn’t release either man’s race the day of the shooting. That night, the neighborhood erupted in violence. Demonstrators burned six businesses and a police squad car.

Flynn released more details the following day, including Heaggan-Brown’s race and that his body camera showed Smith was armed. Flynn didn’t release the video, however, and more violence broke out that night. Protesters again threw rocks and bottles at police, and an 18-year-old man was shot and injured. Police arrested about 40 people over the course of the three nights. Flynn blamed protesters from outside of Milwaukee for much of the unrest.

Flynn fired Heaggan-Brown after he was charged with sexual assault in an unrelated case. According to a criminal complaint, Heaggan-Brown and another man went to a bar late on the night of 14 August where they drank heavily and watched television coverage of the riots. The man told investigators that Heaggan-Brown bragged that he could do anything he wanted without repercussions, and that he woke up to Heaggan-Brown sexually assaulting him.

Heaggan-Brown also was charged with soliciting two other people for sex several times since December 2015 and with sexually assaulting another unconscious person in July 2016 and photographing that victim naked. He faces two felony counts of second-degree sexual assault, two misdemeanor prostitution counts and one felony count of capturing an intimate representation of a person without consent.