It wasn’t the first killing on BART. But Tuesday’s bizarre attack — in which a man walked away from treatment at a San Leandro hospital, boarded a Warm Springs-bound train and allegedly stabbed a passenger multiple times — left top officials stunned.

Managers and board directors on Wednesday were piecing together how the violent incident unfolded as the transit agency struggles to gain the trust of riders amid a surge of violent crime.

The suspect, Jermaine Jeremiah Brim, 39, of San Francisco, was a hospital “walk-away” listed as a missing person at risk before he wandered into the BART system, wearing a sweatshirt and no shoes, interim BART Police Chief Ed Alvarez said Wednesday.

The victim, Oakland resident Oliver Williams, 49, intervened when Brim tried to steal the shoes of a sleeping passenger, authorities said. Brim allegedly took Williams’ knife during a struggle and stabbed him to death. Brim was booked Tuesday on suspicion of first-degree murder and carjacking.

“What a tragedy this was,” General Manager Robert Powers told reporters at MacArthur Station on Wednesday afternoon. Powers insisted that BART is a very safe system, “despite what happened yesterday.”

State Department of Justice records show homicide, rape, assault and robbery have doubled on BART — from 234 incidents in 2015 to 481 incidents last year — after six years of relative stability. The agency reported 323 violent crimes on BART in 2019 through August, a 3% uptick compared to the first eight months of last year.

BART officials routinely grapple with violence in the system with calls for action and long periods of bickering among board members. Last year’s slaying of 18-year-old passenger Nia Wilson prompted demands for more safety protocols. Likewise, Tuesday’s slaying shook up the transit system’s officials.

“I didn’t get any sleep last night,” BART board Director Robert Raburn said Wednesday afternoon. “It’s devastating.”

Brim has a criminal history. Records show he was arrested in May in San Francisco, where he faces several gun charges, including felony counts of discharging a firearm with gross negligence and shooting from a motor vehicle. Brim was also arrested in August 2010 for driving under the influence of alcohol. He pleaded guilty on one count of reckless driving.

Brim’s cousin, Lynette Fisher, said the incident and arrest has rattled the family. Brim was arrested while allegedly trying to steal a vehicle not far from the South Hayward Station.

“I’m not so sure what exactly happened,” Fisher told The Chronicle. “We are all just basically in shock.”

She said her cousin worked at a hospital and has a son who is about 10 years old. Brim’s mother died in January 2018, Fisher said, and he did not take the death well. Since then, she said, she has not spoken with him.

Williams — who went by another name, Tyrone Hodges, on social media — was a father, uncle and brother who attended Newark Memorial High School. The long-time East Bay resident was a big Oakland Raiders fan and family man.

Jazmine Creech of Hayward said Williams was her dad’s best friend, and that he always attended barbecues, birthday parties and camping trips. He was up for whatever the kids wanted to do — even if it was dressing up Barbie dolls.

“He was loved by everyone he came into contact with,” Creech said. “He wasn’t a violent person.”

For BART, the incident was part of a larger reckoning about how to police the transit system as it has taken on problems from the outside world.

“This is a moment to grieve with the (victim’s) family and recognize that we are challenged by a number of problems in our region and in our country,” said BART board President Bevan Dufty.

BART Director Debora Allen on Wednesday advocated for a 50% increase in the agency’s police force, which added 54 officers and 11 community service officers over the past year. The board approved funding in June to hire another 19 officers.

“We’re doing everything we can to have a fully staffed police department moving forward,” Powers said.

However, policing is still a source of tension on the board, with some directors advocating for civilian ambassadors to patrol trains and stations rather than adding more sworn officers. Allen views the proposed ambassador program as a waste of money.

BART police are investigating whether Brim paid to get into the rail system, as some members of the Board of Directors have cited fare evaders as contributing to rising crime in stations and on trains. Wilson’s alleged killer, John Lee Cowell, was found to have illegally gained entry to BART’s MacArthur Station before the fatal stabbing.

The transit agency has made slow progress replacing its current pie-wedge fare gates with a more secure model to stop evaders. So far, officials haven’t found $150 million to complete the project, which could take years.

“We haven’t made this a top priority,” Allen told The Chronicle on Wednesday. “And I’m not going to shut up until we do.”

Passengers had mixed reactions to this week’s violence, with some shrugging off the stabbing as routine for a transit system that’s become a repository for the region’s issues, from violent episodes and pervasive homelessness to drug use and rampant mental illness. Others said they’ve lost faith in the agency’s ability to protect riders.

“I never feel safe on BART,” said Harvey Yong, a Richmond resident who was waiting for the train Tuesday night at El Cerrito del Norte Station. “So many things happen. Stabbings, cell phone robberies — I’ve thought about getting a weapon myself.”

Several riders recoiled at the idea of a greater law enforcement presence, pointing to a recent controversy in which police handcuffed a man at Pleasant Hill Station following a dispute about whether he was allowed to eat a sandwich on the platform.

“Police are never around … but they can come out when a person is eating a breakfast sandwich,” said John Howard, who was boarding a train Wednesday morning at Powell Station in San Francisco. He said Sahleem Tindle, who was fatally shot by a BART officer near the West Oakland station last year, was his cousin.

In recent weeks, BART’s board sparred over whether to ban panhandling in trains and stations or crack down on other low-level crimes.

The sandwich-arrest saga became a point of contention, particularly after Director Janice Li joined protesters who ate sandwiches at Embarcadero Station in San Francisco.

Rachel Swan, Evan Sernoffsky, Anna Bauman and Alejandro Serrano are San Francisco Chronicle staff writers. Email: rswan@sfchronicle.com, evan.sernoffskly@sfchronicle.com, anna.bauman@sfchronicle.com, alejandro.serrano@sfchronicle.com