(KRON) — A San Jose man was arrested after he beat a random stranger with a hammer until the victim was unconscious on a San Mateo sidewalk, police said. Joaquin Morales, 41, was arrested on attempted murder charges.

The violent incident happened around 2:30 p.m. Tuesday on North San Mateo Drive. Police said Morales had been hired by a construction contractor to work on a home. While Morales was working, a 34-year-old man was out walking with his mother.

“Morales ran towards the victim and hit the victim in the back of the head. Morales struck the victim an additional two times while the victim was unconscious on the ground. Morales stole his employer’s vehicle and fled the scene,” the San Mateo Police Department wrote.

The victim and the suspect did not know each other, and the attack was unprovoked, police said. When officers arrived on scene they found the victim suffering from severe head trauma on the sidewalk. He was rushed to a local hospital.

One officer spotted Morales near the intersection of 4th Avenue and South Fremont Street.

Morales was arrested following a foot pursuit. “Officers immediately observed objective symptoms that indicated Morales was under the influence of a controlled substance,” SCPD wrote.

Two witnesses identified Morales as the hammer-wielding assailant. He was treated at a hospital for being under the influence of drugs, police said.

Morales was later booked into a San Mateo County Jail on charges including attempted murder, stealing a vehicle, and resisting arrest. He also had two outstanding warrants in Santa Clara County.

In the wake of the hammer attack, the San Mateo Police Department is encouraging more residents to utilize security cameras and register their cameras locations. Police wrote, “They are especially helpful identifying suspicious activity in neighborhoods when cameras are street facing.”

You can help by notifying SMPD where cameras are located in your neighborhood at cityofsanmateo.org/Nest.