At least six people are dead after a series of shootings around a college in Santa Monica, California, say police.
The rampage began at a house and ended on campus where police say they shot the gunman in the college library.
Police say the attacker killed two people in the home, two more as he headed to the nearby Santa Monica College and another two on campus.
The gunman was described as in his late 20s, wearing a bullet-proof jacket and armed with an assault-style rifle.
The college is streets away from a fundraising event that was attended by President Barack Obama on Friday, although there is no suggestion of any link.
The violence broke out before noon, when the gunman, dressed in black and wearing an ammunition belt, fired shots at a house, witnesses said.
The property was then consumed by fire, although it is not clear how the blaze started.
Neighbour Jerry Rathner said she witnessed the shooting from her verandah, 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 signalled to another car with a female driver to slow down and fired into the car several times.
Ms Rathner said she rushed to help the victim and saw she had a shoulder injury.
"He fired three to four shots into the car, boom, boom, boom, right at her," Ms Rathner said.
Authorities say the violence then moved to a street corner near the college, where the suspect fired at passing vehicles before moving into the college campus.
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 ran across the college campus and in front of the English building 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 percent that the suspect who was killed operated in a solo or alone capacity," Chief Seabrooks added.
Three women were taken to the Ronald Reagan UCLA Medical Center. The doctor in charge of emergency medicine said one patient had died, one was undergoing surgery and the third was in serious condition but doing well.
Three more patients were taken to the UCLA Medical Center Santa Monica and were treated for minor injuries. One was treated for shrapnel-like wounds, the other two were not wounded by gunfire.
At the time of the shooting, President Obama he was speaking at a fundraiser for the Democratic National Committee.
The Secret Service, which protects the US president, said the incident did not affect Mr Obama's schedule.
Santa Monica College offers a two-year programme and has about 34,000 students.