Receive the latest local updates in your inbox

A man had surgery Tuesday afternoon after being shot by a sheriff’s deputy. Officials say the suspect stabbed the deputy in the leg, so his partner opened fire. NBC 7’s Rory Devine talked to one man who witnessed the ordeal from just feet away. (Published Tuesday, April 8, 2014)

A San Diego County sheriff's deputy was stabbed during a confrontation near a La Mesa gas station.

La Mesa police were called to Center Drive and Jackson Drive after a radio call of shots fired was made at 9:23 a.m. according to Lt. Angela Desarro.

Deputy Stabbed at La Mesa Gas Station

NBC 7's Elena Gomez files this report on a stabbing involving a San Diego County sheriff's deputy. A suspect in the stabbing was shot by a deputy and transported to a nearby hospital. (Published Tuesday, April 8, 2014)

A deputy was stabbed in the leg while trying to apprehend a man -- now identified as Allan David Riley, 55 -- possibly wanted on a felony warrant. Riley was then shot and injured by the injured deputy's partner, officials said.

Both the deputy and suspect were taken to a nearby hospital. Officials said the deputy's injury was not life-threatening and he was treated and released.

The suspect underwent surgery and is expected to survive his injuries.

A woman who asked not to be identified saw the confrontation. She told NBC 7 the deputies were talking with the suspect when the man tried to run.

She said the deputies tried to grab Riley and then she described hearing one gunshot.

“I felt like I froze,” the witness said. “I felt like was in a daze, staring and couldn’t believe what I had seen.”

Dondre Wells also witnessed the ordeal. He said the suspect got upset when the two deputies asked to see his backpack.

“He took one strap off like he was going to hand it to them, and he tried to take off running. One of the officers jumped and grabbed him. Then he yelled, ‘knife!’ He pulls it out and stuck the other officer in the leg. The partner just stands back and opened fire on him," Wells said.

Giannantonio said he did not have information on what made the deputies focus on this particular subject. As far as he was aware, the suspect was not under surveillance.

"Any deputy sheriff or any police officer can contact anyone out in the public," Giannantonio said.

Officials have not identified the deputies involved in the incident.

The deputy who fired the shot was placed on administrative leave.

Giannantonio said the suspect was carrying a six-inch blade and, according to department protocol, the deputy used an appropriate response.

The road was closed for hours as authorities conducted their investigation.

The gas station has security cameras and video that may help in the investigation, officials said.

According to the San Diego County Sheriff's Deparment, Riley was found to have several warrants for his arrest, including burglary, possession of a dirk or dagger and being under the influence of a controlled substance.

Once he's out of surgery, he will be charged with the attempted murder of an officer, the sheriff's department said.

Ed. Note: Officials initially said the suspect was in a black Crown Victoria pumping gas but have since corrected that information, saying the driver of the vehicle was a witness and not involved.