Joe Klamar / AFP - Getty Images Santa Monica, Calif., police search the grounds of Santa Monica College after a shooting was reported Friday. Authorities later said they killed a black-clad gunman in the college library.

Four people were killed and five others injured Friday when a gunman clad in black went on a shooting rampage through Santa Monica, Calif., before being shot to death in the library of a community college, authorities said. A police spokesman said that investigators had concluded the gunman acted alone and that a "person of interest" who was held for questioning had been released.

The shootings took place just three miles away from where President Barack Obama was scheduled to attend a fundraising event. The Secret Service said the incident was believed to be unrelated to the president’s visit.

Police said the gunman used an AR-15-type assault rifle and had other weapons as well as handguns. They have not established a motive for the bloodshed.

Santa Monica Police Sgt. Richard Lewis said the gunman killed two people at a residence and two others at separate locations before he was shot and killed in a library at Santa Monica College.

Earlier, Police Chief Jacqueline Seabrooks said that investigators were combing as many as three crime scenes.

Santa Monica police department officials hold a press conference after a series of shootings near a community college.

Authorities initially responded shortly before noon to reports of a blaze at a home fewer than 20 blocks away from the campus. Responding officers found two people believed to have been fatally shot by the gunman inside the flame-engulfed structure, Seabrooks said. Neighbors told NBC Los Angeles that the shooter is related to the people who lived there.

The gunman is believed to have moved west toward the college, firing at passing vehicles. More shots were fired when the gunman attempted to carjack a passing vehicle, law enforcement sources told NBC News.

Marta Fagerstroem, a student at the college, told NBC Los Angeles that she was on a bus that was stopped at a red light when the gunman stepped out from the passenger side of the car and fired five or six shots at the bus.

"This guy just steps out with a big rifle and starts shooting," Fagerstroem told the station. A woman in the back of the bus was bleeding from her head, she said.

Jonathan Alcorn / Reuters A vehicle sits on the side of a road with a window shattered by bullets. Witnesses said the shooting occurred as a gunman rampaged through a Santa Monica, Calif., community and onto the campus of Santa Monica College.

Attempting to evade officers, the gunman ran onto the college campus and entered a library, where he shot at multiple people, police said. As students scattered, officers entered the library and shot and killed the gunman, the said.

Seabrooks said at an evening news conference that "as many as six" people had been killed during the rampage, but Lewis later said that the toll had been revised to five, including the gunman.

Lewis said five people were injured in the shooting, including one in critical condition, one in serious condition and three with minor wounds.

The gunman has yet to be identified by authorities, who said the coroner's office would do so after conducting an autopsy. He was described as a male Caucasian between the ages of 25 and 30. He was dressed head to toe in black and sported what authorities said appeared to be a bullet-proof vest.

More coverage from NBCLosAngeles.com

Obama was in Santa Monica for a Democratic National Committee event at a private home at 2 p.m. (5 p.m. ET). A spokesman for the Secret Service said the agency was aware of the incident but said it was being treated as "a local police matter at this point."

Richard Esposito, M. Alex Johnson and Niven McCall-Mazza of NBC News contributed to this report.

Watch US News crime videos on NBCNews.com

This story was originally published on