Assault charges against a man who was shot and seriously wounded after he allegedly slammed a bottle into a San Francisco police officer’s face were withdrawn Friday, infuriating rank-and-file officers.

District Attorney Chesa Boudin, a former public defender whose election was opposed by the police union, decided not to pursue criminal charges against Jamaica Hampton, who was shot after he allegedly attacked two officers with a glass vodka bottle in the Mission District in December.

The charges were pulled “without prejudice,” which means they can be refiled at Boudin’s discretion.

“The District Attorney has informed me that at this time he will withdraw charges against the suspect,” Police Chief Bill Scott wrote to his officers Friday. “The DA indicated that this withdrawal is not a dismissal of the case. This unprovoked attack was a violent, criminal act. I want you to know that we remain committed to working with the DA to see that justice is done in this case for our officers.”

The move prompted an angry response from the San Francisco Police Officers Association, which had opposed Boudin in the November election.

“Chesa Boudin just gave a green light to every criminal in San Francisco that it’s now OK to attack a police officer,” Tony Montoya, the union’s president, said in a statement. “He must be held accountable for his reckless decision that will further endanger every officer in San Francisco.”

Alex Bastian, the spokesman for the district attorney’s office, said the case was set aside to avoid conflicts between two separate investigations — one being the internal officer-involved shooting case and the other being the criminal allegations against Hampton.

“Both cases are still under investigation,” Bastian said. “We don't want one investigation to interfere with the other. We are looking into developing a policy to avoid conflicts in cases where multiple investigations are ongoing.”

Bastian on Sunday disputed Scott’s characterization that charges against Hampton had been withdrawn, saying that he was never formally charged. The district attorney’s office filed charges in December but Hampton had not been arraigned.

Hampton, 24, was originally booked on charges of assault with a deadly weapon, assault upon a police officer and threats to an officer after videos from police body cameras and surveillance footage showed him hitting an officer with a vodka bottle and then being chased through the intersection at 23rd and Mission streets.

Officer Sterling Hayes fired six shots at Hampton, who was apparently still holding the bottle when he ran toward the officer. The wounded Hampton attempted to rise from the ground, prompting Officer Christopher Flores to fire another shot, according to police and video surveillance.

Hampton was taken to San Francisco General Hospital, where he was listed Saturday in serious condition. His left leg was amputated this month.

Flores was taken to the hospital with head injuries. He was treated and released.

The case began with a 911 call from a distraught woman, who complained about a man who had broken into her home that morning and confronted her. Another caller said a man with an iron bar was breaking into cars on the block.

Surveillance video shows the two officers arriving at the scene and stopping to question Hampton, who suddenly attacked when Hayes opened the door of the squad car. Hayes tried to defend himself with kicks and then, when his partner ran around the car to help, Hampton struck Flores with the bottle several times.

The two officers chased Hampton, yelling, “Get on the ground,” and tried to pepper spray him before the shots were fired, according to the video and police accounts.

Withdrawing the charges wasn’t the first time Boudin has upset the police since he took office Jan. 8. The city’s top prosecutor announced Wednesday that his office would no longer ask for cash bail as a condition for defendants’ pretrial release.

Peter Fimrite is a San Francisco Chronicle staff writer. Email: pfimrite@sfchronicle.com Twitter: @pfimrite