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 and was airlifted a nearby trauma center, according to the department. A citizen reportedly found him in the parking lot and called in the "officer down" to dispatch using the officer's radio, KCAL/KCBS reports.

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.

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

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

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