Those returning home from Pride celebrations on BART were delayed about an hour Sunday night after three men were pistol-whipped at Embarcadero station.
A BART police watch commander said the train that was halted at the station about 8:10 p.m. became a crime scene.
Four men were detained by San Francisco police officers who saw them fleeing the station after the assault. One of them had a handgun and was booked on suspicion of assault with a deadly weapon.
The three victims were transported to San Francisco General Hospital. Their injuries were not life threatening, police said.
A motive for the attack was not immediately known.