Santa Clarita Valley sheriff's officials said they responded to the incident at about 2:10 p.m. near Sierra Highway and Soledad Canyon Road.
Officials said the suspect was on a Santa Clarita Transit bus and had been "going in and out of consciousness."
The unidentified man was seen talking to SWAT officers before surrendering and being detained by authorities.
SANTA CLARITA UPDATE: Barricaded suspect in custody; bus now cleared https://t.co/9x96bU9y89 pic.twitter.com/LhXOLhbDO5
— ABC7 Eyewitness News (@ABC7) July 11, 2016
It was unclear whether anyone else was on the bus at the time of the barricade.
No injuries were reported in the incident.