The gunman’s rampage began at a home in this beachfront city, leaving two dead inside. Then he carjacked a woman and fired at a public bus. It all ended when police shot him dead at Santa Monica College as students studied for finals, a mile from the house.

His blood trail, however, left four people dead Friday in Santa Monica, which abuts Los Angeles and is renowned for its liberal openness.

A law enforcement source with knowledge of the investigation told CNN Saturday that the gunman had suffered mental health issues. A couple of years ago, he was hospitalized for treatment after allegedly talking about harming someone, according to the official.

It’s not clear whether the state government or his family committed him for treatment or whether he committed himself. It’s also unclear under what circumstances he was released. The gunman has yet to be identified by police.

Authorities have found no link to domestic or international terror, the official added.

Also Saturday, one of four victims shot dead was identified as Carlos Navarro Franco, 68, who resided in one of Los Angeles’ west neighborhoods near Santa Monica, authorities said. He was the driver of an SUV who was gunned down on the campus, police said.

The three other victims also have not yet been identified. The two-year college remained closed Saturday as police combed the crime scene for clues to the rampage, which began shortly before noon at an acquaintance’s house in one of Santa Monica’s breezy neighborhoods.

Dressed in black and toting an assault-style rifle, the man’s apparently random gunfire became the nation’s latest disturbing killing spree, ending with his death in the college library and leaving this tourist beachfront city reeling with shock.

A neighbor’s account

Jerry Cunningham stepped onto her porch when she heard the shots. She saw the gunman firing at a neighboring house, which was also on fire.

She then observed the gunman force at gunpoint a woman to stop her car.

Another car approached. The gunman waved it by, Cunningham said. That driver, also a woman, hesitated for just a moment, and the gunman “fired three shots directly into her and the car,” Cunningham said.

The motorist was wounded in the shoulder, she said. That driver was hospitalized and is in stable condition, authorities said.

The gunman then got into the first car and forced the woman to drive off with him, police said.

During their ride, 911 calls poured in, keeping police on the gunman’s path, said Sgt. Richard Lewis, a spokesman for the Santa Monica police.

As the car headed toward the campus of the community college, where 30,000 students are registered, he opened fire on a passing bus, slightly wounding three people, Lewis said.

He was carrying an “AR-15 style rifle,” pistols and “more clips for the rifle,” Lewis said.

Police have described the shooter as a 25- to 30-year-old man who was dressed in black and wearing a tactical vest.

As the car pulled onto the campus, the man fired into Franco’s red SUV, killing him and critically wounding his passenger, police said. Franco’s vehicle crashed after the shooting, Lewis said.

The gunman then abandoned the hijacked vehicle — leaving the driver unhurt — and fled on foot, shooting at police, Lewis said.

On campus

College employee Joe Orcutt saw the firefight between the man and officers and took off running, but ran the wrong way and found himself facing the gunman.

“He looked over at me, and I looked at him,” Orcutt said. “He just panned his gun and trained it on me, and I just jumped behind the building and he shot at me.”

The gunman was “very calm, not running around.” He was just “looking around for targets very casually,” he said.

“He just looked like he was standing there posing for the cover of an ammo magazine or something. It was bizarre.”

As the killer ran, he fatally shot a woman, then burst into the campus library, said Santa Monica Police Chief Jacqueline Seabrooks.

Another woman — who asked not to be identified — said she was in the building when she heard a gunshot. She took off.

In a hallway, she saw a dark-haired man in black combat boots who she initially thought was a police officer, but quickly realized was the shooter. The man was walking quietly and casually.

She and a colleague ran; gunshots rang out.

Priscilla Morales said that, when she and her friends looked out a library window and saw people running, they grabbed their belongings and prepared to leave, too, but didn’t get far. “As we open the door, we hear three gunshots,” she said.

So they closed the door and hid.

“I was so scared and thought literally I was going to die,” she said.

“Drop it!” she heard police say, then heard gunshots and a man’s screams.

The officers had shot the gunman, Lewis said.

Police said that, with the exception of his first two victims in the off-campus house, all of the other victims appear to have been chosen at random.