DUBLIN (KRON) — The man accused of stabbing another man to death on a BART train Tuesday afternoon appeared in court for the first time Thursday.

The Alameda County District Attorney formally filed charges against Jermaine Jeremiah Brim, 39, which include murder, two counts of attempted second degree robbery and two counts of attempted carjacking.

He did not enter a plea during the court appearance and is due back in court Dec. 5

Brim is accused of stabbing the victim, Oliver Williams, during a fight that began after Brim allegedly tried to steal a pair of shoes from another BART passenger.

After the stabbing, police believe he left the train, shirtless and barefoot, and headed to a nearby car dealership.

Court documents allege he grabbed car keys from an employee at the dealership and tried to steal a car.

Unsuccessful, he then ran into the street, stopped a car and tried to take that car, according to court documents.

He was then arrested by police.

According to court documents obtained by KRON4, Brim was released from custody in a firearm-related case in San Francisco County Superior Court before Tuesday’s stabbing.

The San Francisco District Attorney’s Office told KRON4 that Brim was charged in May with negligent discharge of a firearm, shooting from a car and possession of a concealed and loaded firearm.

The details of the San Francisco case are unclear at this time.

BART officials said earlier this week that Brim had walked away from a San Leandro psychiatric facility prior to the stabbing.

He was listed as an at-risk missing person after leaving the facility.

He is now being held in the Santa Rita Jail in Dublin without bail.