ADAMS COUNTY, Colo. -- A canine with the Adams County Sheriff's Office saved a deputy who was fighting with a suspect, CBS Denver reports.

A sheriff's deputy responded to a trespassing call around 1 a.m. on Saturday. While on the call, a man the deputy was talking to jumped a fence to get away.

The deputy ran after the man -- later identified as 25-year-old Gabriel Steven Garcia -- and became separated from his K-9 officer, a 3-year-old Belgian Malinois named Lex. The two began fighting.

According to the sheriff's office, Lex managed to unlatch a gate with his paw and come to the rescue of his handler. Garcia was subsequently apprehended and charged with attempted first-degree murder and assault in the attack on the deputy.

Garcia has been advised of his charges and is being held in lieu of $500,000 bail. He is scheduled to appear in court on Aug. 31, authorities said.

Make it easy to keep up to date with more stories like this. Download the WFMY News 2 App now.

Lex has been with the department since February 2015. He is a certified narcotics and police patrol dog with the Colorado Police Canine Association and National Police Canine Association.