Mayor London Breed and Supervisor Matt Haney slammed a judge’s decision to release a man suspected of attacking a woman as she entered her Beale Street apartment building.

A surveillance video of the Sunday attack went viral and prompted officials to question the wisdom of the judge’s decision. The victim, 26-year-old Paneez Kosarian, said the assailant talked about saving the world from robots before he attacked her.

Kosarian and officials are upset that San Francisco Superior Court Judge Christine Van Aken released 25-year-old Austin James Vincent into a pretrial diversion program Monday rather than keep him in jail while he awaits his next court appearance on Sept. 12. He’s pleaded not guilty to charges of false imprisonment, two counts of battery and attempted robbery.

Vincent was ordered to participate in the city’s Assertive Case Management Program as a condition of his release, checking in regularly with a caseworker tasked with ensuring that he does not present a threat to public safety and that he makes his court dates.

David Mauroff, CEO of the San Francisco Pretrial Diversion Project, confirmed that Vincent had been referred to the program but declined to discuss the specifics of a client’s case. He did confirm that Vincent is not required to wear a location-tracking ankle monitor as a condition of his pretrial release. San Francisco police reported after arresting Vincent that he has no local address but did not definitively confirm that he is homeless.

“Any assault like this in our City is disturbing,” Mayor London Breed said in a statement Thursday. “I think the court’s decision to release him while he awaits trial was clearly wrong. ... This man needs to be receiving mental health services under observation, not back out on the street.”

Breed said these kinds of cases are why she is pushing to expand the city’s program to compel mental health treatment for the severely mentally ill and why she’s adding 212 new mental health treatment beds.

Haney, who represents the district where the attack occurred, said he had contacted Kosarian to offer support and is outraged by what he describes as a “horrific attack.”

I spoke directly with Chief Scott, Police Captain Knight, and the DA's office about this case, and the need to speed up additional resources immediately. This was an awful, horrific attack, and I am grateful for Paneez' courage in speaking out for change. She has my full support. https://t.co/y3rtf1XlpK — Matt Haney (@MattHaneySF) August 15, 2019

“People with serious mental health needs should not be released back onto the street without adequate treatment or services,” Haney added, saying that without additional information Van Aken’s decision to release Vincent “doesn’t make any sense to me. From what I know, he should have been kept in custody, and received serious mental health treatment and services.”

The court reporter present for Vincent’s arraignment could not immediately produce a transcript of the proceedings, which could provide insights into Van Aken’s rationale for releasing Vincent.

A court spokesman did not respond to a request for an interview with Van Aken, formerly a prominent litigator in the San Francisco city attorney’s office.

Kosarian said Thursday that when she returned home that evening, she saw Vincent standing in front of the door to her building, clearly agitated. He wouldn’t let her inside.

He asked for her keys, wallet and phone and then told her to open the door so he could kill the “robot” at the concierge desk.

He then grabbed her and wouldn’t let her go. The physical battle was captured on surveillance video and shows an assailant grabbing Kosarian outside the door of the lobby and throwing her to the ground. As she fights her way inside, the assailant pulls her back outside. The lobby attendant helps Kosarian get inside, and both women struggle to keep the assailant from entering.

Kosarian said she’s distraught that “this man is walking the streets of San Francisco and allowed to be free.”

“I’m questioning the judge’s fitness,” she said. “I’m questioning our elected officials’ fitness in this city. ... They don’t keep us safe.”

But Mauroff said that’s just what the Assertive Case Management Program is designed to do — promote public safety. The program works closely with alleged offenders, assessing their needs and coordinating services — including outpatient care, temporary housing, mental health treatment and escorts to court dates and appointments.

The program’s central goals are to prevent alleged offenders from committing any additional crimes and to ensure clients make their scheduled court appearances, Mauroff said. An evaluation by the California Policy Lab, Mauroff added, found that 96% of people referred to the Assertive Case Management program did not commit another crime.

Mauroff disputed the notion that the city’s criminal justice system is haphazardly allowing dangerous-seeming people to go free when they ought to be in jail.

“It’s a validated and scientifically driven approach to helping our clients rehabilitate and get back on their feet,” he said.

The public defender’s office stood by requiring Vincent to report to Assertive Case Management.

“Mr. Vincent has no prior violent offenses, nor any previous or outstanding warrants. ... By all accounts this appears to have been a young man having a mental health crisis,” it said in a statement.

But the district attorney’s office said the case management program was not a good fit in this instance. Both Kosarian and the district attorney’s office requested that Vincent remain in custody.

“We’re not thrilled about the prospect of jailing someone who’s mentally ill, but in this case it was the better of two bad options. We’re not a fan of rolling the dice,” said Max Szabo, a spokesman for the district attorney’s office. Szabo said a shortage of mental health services means that suspects are not placed in treatment quickly.

District Attorney George Gascón tweeted Thursday afternoon that “a temporary bed was found for this defendant,” but it wasn’t immediately clear if the suspect was in the residential treatment facility.

The San Francisco Police Officers Association also weighed in, suggesting that the Van Aken be assigned to traffic court.

“Van Aken should not be allowed to preside over any criminal cases,” it said in a statement. “She may have been a reasonably competent civil attorney, but she is a catastrophe of a criminal judge."

Nancy Connor, 30, who lives near where the assault took place, said she had heard about the assault but not that the suspect had been released. She said it is “ridiculous,” adding she now feels afraid in her neighborhood. “That makes no sense, though. It’s terrifying.”

Kosarian said she suffered injuries when she tried to push and pull away from her attacker. She said she has nerve damage and pain in her hand and arm, and up the right side of her body to her neck.

She remains frightened and has mostly stayed inside since the attack.

“I need to see this man back behind bars,” she said. “I don’t want to see this happen to anyone else in San Francisco.”

Kosarian said she doesn’t know anything about why Vincent was released and questioned how the judge made her decision.

“I need to know what the judge was thinking,” she said. “How does she think about other people if she’s not thinking about me?”

Correction: An earlier version of this story misstated Judge Christine Van Aken’s first name. The error has been corrected.

Dominic Fracassa and Jill Tucker are San Francisco Chronicle staff writers. Email: dfracassa@sfchronicle.com, jtucker@sfchronicle.com Twitter: @DominicFracassa, @jilltucker