Mustafa, 21, was charged with four counts of attempted first-degree murder and two counts of discharging a weapon into occupied property, according to newly filed arrest warrants.
According to the warrants, Mustafa attempted to kill four law enforcement officers during the gunfire exchange outside the courthouse: Wilson Police Officers Harrell, Davies and Green, and Wilson County Sheriff's Deputy Bissette. The warrants also allege he fired into an occupied Wilson Police patrol vehicle while an officer was inside.
A judge ordered Mustafa held without bond.
After the ruling, Mustafa addressed the public from the courtroom.
"Let the public know this is not a reflection of who I am as a person," Mustafa said. "I do not condone what I did. It was an impulsive choice, and overall it does not represent me as an individual. It was a product of emotion. I'm not trying to avoid the repercussions."
Wilson County Sheriff Robert Woodard said it is unusual for a defendant to make such remarks during a first appearance hearing.
"It is odd that you see someone come before you and go ahead and admit to the crime like he did, but it did take a man, a human being, to actually stand up and admit to the atrocities that he actually did," Woodard said.
Friday's hearing marked Mustafa's second court appearance this week.
Investigators say Mustafa shot 19-year-old Latoya Lucas before exchanging gunfire with responding officers. He also faces charges related to that shooting.
The case remains pending.