SAN FRANCISCO — A man was killed and two others were injured Monday in a shooting on the San Francisco-Oakland Bay Bridge that caused several cars to collide and shut down all traffic lanes for hours, authorities said.

The three men were riding in a sport utility vehicle heading from San Francisco to Oakland about 2:20 a.m. when a vehicle pulled alongside it and someone opened fire at the SUV, California Highway Patrol Officer Bert Diaz said.

The driver of the SUV died at the scene, and another man was shot and wounded. A third man suffered injuries from the collision, Diaz said. The injured men were taken to San Francisco General Hospital.


The SUV swerved and hit a sedan, Diaz said.

Raul Lopez told KTVU he was driving home to Oakland when he heard five shots and seconds later an SUV crashed against the front of his car and made his car spin around. He was not hurt.

‘‘I went to see if they were OK, and when I walked to the SUV the driver was dead on the scene,’’ Lopez said.

Another man was shot on the arm., he said. ‘‘I helped him out and threw a white shirt on him so I could stop the bleeding because he was bleeding pretty bad,’’ Lopez said.

Two of the five eastbound lanes remained closed for hours while officials investigated, causing major traffic delays in one of the main traffic arteries in the Bay Area.

In a separate development in Titusville, Fla., on Saturday., a bystander who was lawfully carrying a firearm shot a gunman who opened fire at a back-to-school festival.

Florida Today reported Monday that the gunman was shot in the head and airlifted to the hospital with life-threatening injuries.

Police haven’t yet identified the gunman in the shooting at the ‘‘Peace in the City’’ festival in Titusville.


Authorities say he got into a fistfight earlier in the day and returned to the park with a gun and opened fire. School supplies were handed out at the festival and there were around 150 people in the area when the shooting started.

The bystander was cooperating with investigators and wasn’t expected to face charges. No one else was injured.