PASO ROBLES (CBS SF) — The San Luis Obispo County Sheriff Wednesday evening identified the man suspected of shooting a deputy in the head during a targeted “ambush” at a Paso Robles police station and killing a second victim hours later.

UPDATE: Paso Robles Police: Shooting Suspect Down, Multiple Officers Wounded In Shootout

READ MORE: UPDATE: Estrada Fire Containment Now 25%; Evacuation Orders Downgraded as Crews Mop Up

The sheriff’s office issued an update at around 9:30 p.m. that identified the shooting suspect as 26-year-old Mason James Lira, a transient from the Monterey area.

Authorities had released a pair of images of Lara Wednesday afternoon. He was described as a Hispanic male in his 20’s or 30’s, standing 5 foot 8 inches and weighing 150 to 160 lbs. with curly hair and a beard.

Paso Robles shooting suspect (SLO County Sheriff’s Office)

The incident began when Lara opened fire on a police station in Paso Robles at around 3:45 a.m., said San Luis Obispo County Sheriff Ian Parkinson.

Staff on duty at the station at 900 Park Street observed the suspect outside their building who was armed with a firearm and began shooting at the police building. The police department requested assistance of the San Luis Obispo County Sheriff’s Office and CHP. The suspect began firing at patrol cars as they entered the downtown Paso Robles area.

At approximately 4:19 a.m., two deputies were searching the downtown area when they came under fire from the suspect. One of the deputies was shot in the face by the suspect. The deputy’s partner dragged him to safety and returned fire, Parkinson said. The bullet remains lodged in his head and he’s in serious condition, he said.

“We feel that this was an ambush; that he planned it, that he intended for officers to come out of the police department and to assault them,” said Parkinson.

Gunfire occurred over a span of some minutes, said sheriff’s spokesman Tony Cipolla. Two sheriff’s deputies were fired upon when they arrived on the scene, wounding one. His partner returned fire, Cipolla said.

The deputy was airlifted to a trauma center out of the area. The sheriff’s office was not releasing his name but said he is a two-year veteran of the agency.

READ MORE: Pandemic Points Up Need to Diversify Lake Tahoe Tourist Economy

“He’s not out of the woods,” Parkinson said. “This is very serious.”

Police and the sheriff’s office were pursuing leads and asked anyone with surveillance video related to the shootings contact authorities.

“We feel very confident the suspect is no longer in our area,” said Paso Robles Police Chief Ty Lewis.

The sheriff’s office said the body of the second victim was discovered Wednesday morning in the vicinity of the Amtrak station at 8th Street and Pine Street in Paso Robles a few blocks from where the deputy was shot earlier.

Paso Robles shooter search (CBS)

Lewis said the unidentified victim was a 58-year-old male who appeared to be a homeless person sitting or sleeping near the tracks. Lewis said the man suffered a single gunshot to the back of the head.

An intense search for the gunman in downtown Paso Robles concluded without finding the suspect, but downtown Paso Robles remained closed after that for the processing of evidence.

Officials said they believed it was a lone gunman.

The FBI, the CHP and the California Department of Justice are providing technical assistance to sheriff’s detectives.

The homicide investigation is being conducted by the Paso Robles Police Department while the shooting of the deputy is being investigated by the Sheriff’s Office. Both investigations are ongoing.

MORE NEWS: Pleasant Hill Police Ask Public for Help Finding Stabbing Suspect

Authorities said Lira is considered armed and dangerous. If he is seen in public, individuals are advised not to make contact with Lara and should instead call 911 and report his location to law enforcement.