Multiple cars were involved in the wreckage at US-101 and Fair Oaks Blvd around 12:36 a.m., according to California Highway Patrol.
Sergeant Gil Ontiveros said the three that were killed had gotten out of their cars after crashing and were walking on the highway when they were struck. Two of them were thrown across the median when they were struck by a second car going the opposite direction, officials said.
The county medical examiner identified two of the victims as Tyler Rasay, 28, of South San Francisco, and Paul Dennig Jr., 24. The third victim has not yet been identified.
A dented red truck was the vehicle that started the series of crashes, authorities said.
The five that were injured were taken to the hospital, but the extent of their injuries is unknown.
Around 7 a.m. tow trucks arrived to remove 6 cars from the northbound side and another from the southbound side. A chunk of the median was gone and crash debris covered the highway.
The highway started reopening around 9 a.m. Monday, with only one lane remaining closed on the northbound side.
Officials have not said whether alcohol played a factor in the crash.