SAN BERNARDINO, Calif. (AP)  Two former California sheriff’s deputies pleaded no contest Monday to charges of disturbing the peace in a deal to avoid a retrial in connection with the televised beating of a man who tried to escape from authorities on horseback.

The plea came days after a jury deadlocked while deliberating assault charges against former San Bernardino County sheriff’s deputies Michael Phelps and Nicholas Downey.

As part of the plea agreement Monday, prosecutors agreed to dismiss the felony assault charges and both were sentenced to one year of probation.

“After reevaluating the evidence and learning that the jury was hopelessly deadlocked, there is no reasonable likelihood that another jury would be able to reach a verdict,” San Bernardino County District Attorney Mike Ramos said in a statement about the deal.

Downey’s attorney, Michael Schwartz, said his client was grateful for the support he received during the trial and now wants to focus on trying to get his job back.

Downey is no longer employed by the sheriff’s department and would have to appeal to the Civil Service Commission, sheriff’s spokeswoman Jodi Miller said. She declined to comment on the plea agreement.

Another ex-deputy, Charles Foster, was found guilty last week of assault by a public officer under the color of authority. His attorney has vowed to appeal.

The case against the deputies stemmed from an April 2015 incident when they chased Francis Jared Pusok while he was on a horse that authorities said he stole in the desert.

A KNBC-TV helicopter tracked the pursuit as Pusok fell off the horse and deputies repeatedly punched and kicked him on the ground. A deputy tried to use a stun gun on him, but it was ineffective.

During a 2½-hour chase, Pusok fled by car and then on horseback after being sought in connection with a burglary and the theft of a motorcycle.

Pusok was face down with his legs outstretched and hands behind his back as a deputy threw punches and kicks.

One deputy kicked him in the crotch. Other deputies arrived moments later. Prosecutors had argued the deputies had “crossed the line under the color of authority.”

The county reached a $650,000 settlement with Pusok.