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: Beverly Hills City Hall To Hold Hanukkah Menorah Lighting Ceremony Tuesday

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.

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

READ MORE: Attorney, Law School Professor Dennis Franks Identified As Man Killed After Tree Falls On Encino Home

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: Germarcus David Charged With Murder Of His 4 Young Children, Their Grandmother Ericka England

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