A gunman who killed three people in a shooting in the US was a former student at the California college where he was ultimately killed by police, officials said.

The attack happened on Saturday near Santa Monica College, west of Los Angeles. A spokesman for the California Highway Patrol told the Reuters news agency that it had received a report of a man armed with multiple weapons, including a shotgun, firing at passing cars and a bus near the college campus.

Police initially reported six dead but revised the figure on Sunday morning. At least five other people were wounded, one of them critically.

The gunman was shot on the pavement outside the Santa Monica College library. Police later released images of his weapons, which included an assault rifle-style weapon and a long barrelled pistol. He was reportedly carrying more than a thousand rounds of ammunition and wearing body armour.

A second person was arrested after the incident.

One witness told a local news station that he saw a man drive up in a car, walk into the middle of an intersection with a gun and open fire at passing vehicles and a building before "he jumped back in the car and took off."

"It seemed like he was alone in his car," said the witness, adding that he took cover under the dashboard of his own 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."

The attack happened several miles from a fundraising event in Santa Monica attended by President Barack Obama.

Source: Agencies