A black-clad gunman killed at least four people in a shooting rampage in the US state of California Friday, before police shot him dead in a college library, officials said.
The assailant began by killing his father and brother before a random string of slayings in Santa Monica, only a few miles from an event attended by President Barack Obama.
One witness described how the gunman, a white male aged 25 to 30 carrying an ammunition belt and a semi-automatic rifle, shot a motorist at point-blank range before hijacking another vehicle.
Police revised the death toll late Friday, telling journalists that five including the gunman were killed, down from earlier reports of seven.
Five more were wounded, including one critically and one who was in "serious but stable condition," said Sergeant Richard Lewis.
Another suspect was taken into custody but soon cleared and released after the shootings, which occurred as Obama was speaking at a political fundraiser a few miles away in the oceanfront city, just west of Los Angeles.
"At this time, we believe it's a single gunman. That part of it has been resolved," Lewis said, adding that the coroner was still working on confirming his identity. That information was expected to be released on Saturday.
The shooting is the latest in an all-too regular succession of such rampages, which fuel the gun control debate in America. They follow last year's massacre of 20 schoolchildren in Connecticut, and the slaying of 12 moviegoers in a theater in Colorado.
The incident apparently began with the shootings in a nearby house, which was then set on fire. The Los Angeles Times reported that two bodies found in the burnt-out home were those of the gunman's father and brother.
A witness who lives opposite the house told KTLA 5 television she heard gunfire and rushed out of her house to see a man who had apparently just opened fire inside or on the house, which was beginning to burn.
"There was a guy standing on the street in front of my house, in full SWAT gear, with a belt full of ammunition and a semi-automatic rifle," said the woman, whom the channel identified as Gerry Cunningham.
She described how he walked to a nearby intersection, pointed the gun at a woman in a car and told her to pull over, which she did.
"Then the woman behind her in a car, he waved her through with the gun," she said.
"She kind of hesitated, she kind of slowed down, and he just fired like three or four shots point blank into her in the car," Cunningham said.
The gunman then carjacked another vehicle, and a short time later opened fire on a bus and other vehicles, killing one person and critically injuring a second, before heading into the Santa Monica College, police said.
The fourth victim, a woman, was shot in front of the Santa Monical College library and died after being taken to the hospital.
The gunman then entered the library, where police engaged him in a firefight that left him dead.
In all, six people -- all women -- were taken to two hospitals, including two in critical condition, one of whom died, according to Dr Marshall Morgan, head of emergency medicine at the UCLA Medical Center.
"Today's incident is not a college or school shooting, it's rather a series of shootings that occurred in the city of Santa Monica and culminated with the shooting incident that occurred at Santa Monica College," said Santa Monica Police Chief Jacqueline Seabrooks.
The US president, who had been due to fly back to Los Angeles airport following his appearance at the nearby fundraiser, instead went by motorcade, to avoid any impact on police action.
He arrived a short time later in Rancho Mirage, where he was holding two days of talks with Chinese President Xi Jinping aimed at forging a new approach to relations between the United States and China.