A gunman has killed at least five people in Santa Monica, California, before he was shot dead by police at a library of a community college, Police Chief Jacqueline Seabrooks said.
Seabrooks said a second individual she described as a "person of interest" had been taken into custody in connection with the violence, which unfolded a few kilometres from where President Barack Obama was attending a political fundraiser.
Authorities also found two people dead at the scene of a nearby house fire, but police said it was not immediately clear
whether the fire and the shooting incident were related.
Earlier, a spokeswoman for the California Highway Patrol had told the Reuters news agency that officers had received a report of a man armed with multiple weapons, including a shotgun, firing at passing cars and a bus at two locations near the college campus just west of Los Angeles.
Students at the campus library described a scene of pandemonium as the sounds of gunfire rang out, sending students scurrying for cover.
One student inside the library, Cyrus Jabari, 19, said he could see through a window a man dressed in black with a buzz-style haircut carrying what appeared to be an assault rifle.
"The only thing between me and him was a glass door," he told Reuters.
At a house fire less than half a kilometre away from the shooting, authorities found the bodies of two people, but it was not immediately clear if their deaths were related to the campus shooting.
Local television station KNBC, citing a fire department official, reported that a woman was found suffering a gunshot wound in a car outside the burned home.
"It seemed like he was alone in his car," the witness said, saying that he took cover under the dashboard of his car, which was struck by gunfire. "I saw him jumping out of the car. He had a big, black gun in his hand and he just started blasting maybe 10 rounds from the left to the right," he said.
Obama was attending a fundraising event at the Santa Monica home of former News Corp President Peter Chernin at about the time of the shooting and had just finished his remarks. He made no mention of the incident.
A Secret Service spokesman in Washington said: "We are aware of the incident and it is not impacting the visit. It's a local police matter at this point."