The attack began at a house and ended on a college campus where police say they shot the gunman in the library.
Police initially put the death toll at six, but later revised it to five people dead, including the shooter.
The gunman was in his late 20s and had been carrying an assault-style rifle, say witnesses.
President Barack Obama was at a fundraiser not far from where the shooting unfolded just before noon on Friday.
The gunman, dressed in black and wearing an ammunition belt and bullet-proof jacket, began by firing shots at the house, witnesses said.
The property was then engulfed by fire although it is not clear how the blaze started.
The Los Angeles Times reports that the first two victims were the gunman’s father and brother.
Neighbor Jerry Rathner said she witnessed the shooting from her veranda, the Associated Press reported.
The gunman then walked to the street corner, pointed his gun at a driver and told her to pull over.
He signaled to another car with a female driver to slow down and fired into the car several times.
Authorities say the violence then moved to a street corner near Santa Monica College where the suspect fired at passing vehicles.
The gunman then entered the campus where he is said to have shot a woman as he made his way toward the college library, where students were studying for final exams.
“We saw a woman get shot in the head,” administrative assistant Trena Johnson told the Associated Press.
“I haven’t been able to stop shaking.”
Witness Lisa Peters said she was at the campus radio station when they received a call that shots had been fired.
“We were on lockdown and we all tried to remain calm. I was there for about two and a half hours, but it seemed much longer than that,” she said.
“Suddenly I heard police and swat teams yelling and saying to us that we had to evacuate.
“It was very dramatic. On leaving the campus, we walked right passed a body which we think was the gunman.”
Police Chief Jaqueline Seabrooks said the gunman entered the college library and fired at people but did not hit anyone.
“The officers came in and directly engaged the suspect and he was shot and killed on the scene,” she said.
Student Jimes Gillespie, 20, said he saw a car riddled with bullet holes, shattered glass and a baby seat in the back.
Authorities also took into custody a second man dressed in black with the words “life is a gamble” on the back of his shirt.
“We are not convinced 100% that the suspect who was killed operated in a solo or alone capacity,” Chief Jaqueline Seabrooks added.
Three women were taken to the Ronald Reagan UCLA Medical Center, where a doctor said one patient had died, one was undergoing surgery and the third was in a serious condition.
Three more patients were taken to the UCLA Medical Center Santa Monica to be treated for minor injuries.
The shooting unfolded a few miles from where President Barack Obama was speaking at a political fundraiser.
The Secret Service, which protects Barack Obama, said the incident did not affect his schedule.
wiqWOA4UmtcImage source: Wikimedia Commons President-elect Donald Trump celebrated his election victory at the Ultimate Fighting…
Millions of voters across the US chose to return Donald Trump to the White House…
Donald Trump declares victory in the US election as he addresses jubilant supporters in Florida.…
Stocks around the world are rising as Donald Trump appears to be on the cusp…
Donald Trump has won Pennsylvania, North Carolina and Georgia and taken a lead over Kamala…
Quincy Jones, the celebrated musician and producer who worked with Michael Jackson, Frank Sinatra, Ray…