A Sonoma County Sheriff’s deputy was shot Sunday morning during a confrontation with an armed employee of a gas station and car wash on Highway 12 in Sonoma.

The deputy, working as a police officer for the city of Sonoma, suffered nonfatal wounds and was reported in stable condition Sunday night at Santa Rosa Memorial Hospital.

Deputies arrested Ryan Joseph Pritel, 20, of Sonoma. He was booked into the Sonoma County Jail on suspicion of attempted murder and carrying a loaded firearm in public.

The shooting took place shortly after 11 a.m. at the Jolly Washer 76 gas station at the corner of Highway 12 and Ramon Street. Two deputies responded to a report from the car wash manager that Pritel was acting erratically and refused to go home, according to sheriff’s officials.

The manager reported Pritel was armed with what appeared to be a BB gun and was working in the car wash line, Sonoma Police Chief Bret Sackett said.

When deputies arrived they interviewed the manager, who said Pritel was still at the car wash. Deputies saw him standing behind a gray pickup in line to enter the car wash.

“They see the suspect … kind of hunkered down behind of one of the cars, kind of acting strange,” Sackett said.

Officials said Pritel drew a 9mm semiautomatic handgun and fired at one of the deputies.

Sackett said the deputy was hit with a round of “snake shot,” a bullet whose projectile is made up of small pellets.

The deputy was hit in various parts of his upper torso, including his hands, arms and face near his left eye, officials said.

Sackett said the deputy fired at the suspect twice but did not hit him.

“It looks like (the suspect) may have tried to fire a second time but … his gun malfunctioned,” Sackett said.

Pritel threw the gun down and was detained without further incident. The handgun was recovered along with a 20-round magazine.

Sackett would not release the name of the injured deputy, who was flown by helicopter to Santa Rosa Memorial Hospital.

“He appears to be in good shape and should have a full recovery,” Sackett said during an interview with media at the scene.

Following the shooting, sheriff’s officials interviewed several employees of the car wash. The entire perimeter of the gas station, food mart and car wash was cordoned off with yellow police tape.

A gray pickup still sat in line to enter the car wash. A bullet hole in the rear window of the truck’s cab may have been caused by the deputy’s shots.

Though the shooting was not fatal, the Sheriff’s Office has asked the Santa Rosa Police Department to review the incident in accordance with a countywide protocol for officer involved shootings.

You can reach Staff Writer Martin Espinoza at 707-521-5213 or martin.espinoza@pressdemocrat.com. On Twitter @renofish.