CALDWELL -- Prosecutors say a pair of then-deputies at the Canyon County Jail charged with orchestrating an attack on an inmate had been looking for revenge after their intended target injured a fellow corrections officer in an escape attempt.

Kade McConnell, 23, is charged with solicitation to commit aggravated battery, while Corey Weathermon, 46, is charged with aiding and abetting aggravated battery.

Prosecutor Shelley Akamatsu said other deputies caught wind of the planned attack, and halted it before it could be carried out. Both McConnell and Weathermon were fired.

Akamatsu said the men were angry after an inmate - identified by the initials S.G. - tried to escape the jail Oct. 8, 2017 by attacking a guard in an attempt to get his keys.

"That guard was badly beaten, and had to go to the hospital," Akamatsu told the judge during McConnell's Tuesday hearing.

MORE: Deputy hurt in inmates' escape attempt from Canyon County Jail

Jail staff, including the defendants, were ordered not to retaliate against S.G. after the failed escape.

But within days, Akamatsu said, McConnell and Weathermon were planning to get gang members at the jail to carry out an assault on S.G.

Prosecutors say Weathermon printed out records that were not publicly available showing S.G's photo and 11 charges related to sexual abuse of a child. McConnell then showed the paperwork to six inmates in the pod, while his codefendant acted as a lookout, according to the charges.

Both S.G. and one of the men McConnell approached to attack him are members of the Sureno gang, investigators say.

"Inmate V.N. will testify that the defendant asked him to have the gang quote, 'take care of it,' knowing that gangs absolutely do not tolerate anyone in their group having any crimes against children," Akamatsu said.

Following his conversation with McConnell, V.N. said, he asked to be pulled out of his cell after lights out, and asked the defendants what they wanted him to do.

RELATED: 2 ex-Canyon County Jail deputies charged with soliciting attack on inmate

McConnell allegedly told him that S.G. could be brought into the library, with the door left ajar. McConnell and Weathermon would then bring V.N. and other gang members past the library, giving them access to their target.

"Accidents happen," Akamatsu quoted McConnell as saying.

The plot disintegrated after other deputies overheard inmates talking about it, the prosecutor said. Both McConnell and Weathermon were fired Oct. 30, 2017; charges were filed in the case Monday.

McConnell's attorney, Alex Briggs, urged the judge to release McConnell on his own recognizance or set a low bond in the case.

The defendant had no prior criminal history and "deserves a reasonable bail," he argued.

Briggs told the judge that McConnell was honorably discharged from the Army after serving in Afghanistan, and now supports his wife and 2-year-old son with a mining job. The lawyer added that McConnell's relatives and in-laws will help make sure he attends all his court appearances.

"He's got a ton of support in the community that can certainly help facilitate getting him through this process, and this case," Briggs said.

Akamatsu urged the judge to leave his bond set at $75,000.

"He's alleged to have solicited a violent crime against a person he was getting paid to take care of," she said of McConnell. "This job was specifically to prevent crime, and not create or organize it."

The judge called the allegations "extremely troubling," but ultimately set bond at $15,000. McConnell is due back in court Feb. 20.

Weathermon, who has not yet been arraigned, is due in court Feb. 9.

If convicted, the men face up to 15 years in prison.