A gunman carrying a semiautomatic rifle walked through Santa Monica College's campus and killed four people before police shot him dead in the library, USA Today reported.

The gunman was not immediately identified, but witnesses said they saw him walking calmly, dressed in all black with body armor and a helmet, carrying an assault rifle, a shotgun, a handgun and an ammunition belt.

Santa Monica Police Sgt. Richard Lewis said the gunman was acting alone and also injured five people.

The Los Angeles Times reported an account of a student named Andrey Priadkin who was studying for finals in the library.

"I saw a guy wearing all black, holding a big gun. He looked very calm," he said. "I stared at him. I'm thinking maybe he's [in the] police force."

The man stared back and opened fire, at which point, Priadkin fled.

The Los Angeles Times reported the gunman started his rampage on a residential street where he killed his father and brother before setting fire to his house. The gunman then continued onto the Santa Monica College campus where police shot him dead.

One student's account of seeing the man's gun when he turned and fled, the Times reported.

Police said the gunman was shot down in gunfire in the library where students reportedly did not hear initial gunshots due to headphones.

The gunman was described as being either white or Latino with curly hair, aged between 20 and 30.

Lewis said a "person of interest" was released from police custody and is no longer a suspect.

According to the Los Angeles Times, Dustin Hahn, 25, was studying in the library when he head a loud booming noise followed by screams. He sprinted through the library to escape and arrived at the parking garage where he yelled for students heading to the campus to run away.

"At first I was terrified. I was shaking," he said. "I really don't know what to say, what to think. It's never been this close to me... I didn't really think it could happen here."