SAN JOSE, Calif. (KRON) — A suspect allegedly tried to kill a Santa Clara County Sheriff’s deputy during a short foot chase following a traffic stop over the weekend.

Saturday around 8 a.m., an officer stopped Emmanuel Diaz Ramos, 41, in the area of Rutland Avenue and Parkmoor Avenue, according to the Santa Clara County Sheriff’s Office.

Police said a foot chase was initiated after Ramos fled the traffic stop. Officers said Ramos brandished a loaded semi-automatic gun pointing it at the deputy and threatening to shoot the deputy.

After a struggle over the gun, the deputy was able to regain control over the firearm, according to officials. Ramos then fled again to his vehicle and sped away, officials said.

The deputy drove himself to the hospital and was treated for minor injuries. It was not specified what the deputy’s injuries were or how exactly he got them.

KRON On is streaming live news now

Officers said they later learned that Ramos was a convicted felon and was driving a stolen vehicle. An arrest warrant for Ramos was issued and officers arrested him on Monday at the Pruneyard Shopping Center in Campbell, Calif.

Ramos was booked into the Santa Clara County jail and charged with attempted murder on a peace officer, assault with a deadly weapon on a peace officer, vehicle theft, resisting arrest, criminal threats and felon in possession of a loaded firearm and ammunition.