HESPERIA, Calif. (AP) — A Southern California sheriff's deputy was shot Tuesday in the parking lot of a shopping center and the gunman was arrested after he was wounded during a shootout, authorities said.

The deputy initially responded to reports of an “unwanted subject” at a storage facility in Hesperia, said San Bernardino County sheriff's spokeswoman Cindy Bachman.

The man left the area and the deputy found his car at the nearby parking lot of Mojave Plaza, where the shooting occurred, according to Bachman.

“We are not sure exactly what happened, but the deputy was shot in the arm," she said. The deputy was airlifted to a hospital for surgery and is expected to survive. He was not identified. 

When responding deputies located the suspect's car a few miles away, the man got out and began firing at them, Bachman said.

The deputies fired back and the suspect was shot, she said. He was hospitalized with unknown injuries, the Daily Press reported.

No deputies were injured in the shootout in the city of about 95,000 residents on the southern edge of the Mojave Desert.