Investigators said it began when deputies approached two men suspected of planning to break into cars near Union Pacific and Fraser avenues.
When they tried to detain the men for questioning, one of them ran away.
The deputies pursued him on foot.
"The suspect turned into a driveway, came to a locked gate at the back, he was trying to get over the gate and the deputies ordered him to stop and raise his hands," said sheriff's spokesman Lt. Don Slawson. "He turned and pointed a handgun at one of the deputies, and the deputy in fear for his life fired one round at him."
Authorities said a bullet apparently grazed the man. He was treated at a hospital and released.
The deputies were not injured.
Charges are pending against the man.
The second suspect was being questioned but it is unclear if any charges will be filed against him.