HESPERIA (CBSLA) — A San Bernardino County Sheriff’s deputy was shot and critically wounded Tuesday afternoon, while a suspect was also arrested following a separate shootout in which he was also wounded.

The deputy, assigned to the Hesperia station, was shot in an Aldi parking lot near Bear Valley Road and Jacaranda Avenue and was airlifted a nearby trauma center, according to the department.

READ MORE: California Focusing On Urgent Projects As Wildfire Season Looms

The deputy was responding to a call at a storage facility. The person in question had apparently already left but the deputy later found a vehicle at the Aldi store that matched the description given at the storage facility.

Some type of confrontation then happened with a passenger of the vehicle.

READ MORE: Future Of Hollywood's Cinerama Dome Still In Question

“I don’t know for sure if the deputy was shot with his own gun,” Cindy Bachman, SBSD spokesperson, said.

A bystander found the deputy in the parking lot with a gunshot wound. The deputy was then taken to a nearby trauma center.

The driver fled the parking lot before the bystander arrived and was later found by Apple Valley deputies who followed him to a residential area.

“At that point, the driver bailed out of the vehicle and began shooting at the deputies,” Bachman said.

The suspect was wounded in the shooting and taken into custody.

MORE NEWS: Paul Flores, Father Arrested In 1996 Disappearance Of Kristin Smart

The deputy was said to be in critical condition. There was no update on the suspect’s condition.