Facing the testimony of two co-conspirators and a victim, three men accused in a botched 2013 home-invasion robbery — in which they posed as masked drug agents, shouting “police, get down” and shot two people — pleaded guilty Wednesday.

One by one, as attorneys finalized paperwork, the men agreed to reduced charges and accepted 10- to 12-year prison sentences while a freshly selected jury waited, sequestered at the Ascension Parish Courthouse Annex in Gonzales, for a trial that would never begin.

Darrell G. Comeaux Jr., 40, of Brusly; Bryan S. Richard, 54, of Brusly; and Shalen Paul Theriot, 29, of Walker, each pleaded guilty to single counts of conspiracy to commit armed robbery while Theriot also pleaded guilty to aggravated second-degree battery.

Judge Thomas Kliebert Jr., of the 23rd Judicial District, gave Theriot, who is accused of shooting the mobile home’s occupant, Brent “Smoke” York, 36, in the legs, the stiffest sentence.

Theriot must serve 12 years in prison with credit for time served: 12 years for the conspiracy count and five years for the aggravated battery count, which are to be served concurrently.

Theriot and the other two men faced stiffer counts of attempted first-degree murder, armed robbery and armed robbery with a gun, which presented potential decades-long sentences with convictions at trial.

According to the plea agreements Kliebert read in court Wednesday, the three men and two others made a plan on Oct. 9 and Oct. 10, 2013, to rob York at his Ashland Road home outside Gonzales. Prosecutors have said the conspirators were after drugs and money believed to be in York’s home.

Kristen Theriot, one of the two conspirators who took plea deals Feb. 9 in exchange for their testimony, went to York’s front door to ask for drugs and then signaled to the other four to come in.

With masks on and armed with guns, Shalen Theriot, Bryan Richard and Mickey J. Comeaux, 36, the fifth conspirator, went inside and demanded everyone empty their pockets.

Shalen Theriot then went to the rear of the trailer and demanded cash and drugs from York, shooting him in the legs, the plea agreements say.

According to Kristen Theriot’s plea agreement from February, Darrell Comeaux remained outside the mobile home as a lookout but, at one point, fired a shot through the home’s window and hit Shalen Theriot.

The men in the mobile home fled with a wallet, a laptop and a global positioning satellite device. Ascension Parish sheriff’s deputies later found drugs, money and a stolen gun in York’s home and arrested him on drug and weapons charges.

Mickey Comeaux, of Brusly, is the brother of Darrell Comeaux and, as Kristen Theriot did, took a plea deal Feb. 9 and agreed to testify against the others, including his brother.

Kristen Theriot, 28, of Livingston, received seven years in prison plus probation, for attempted armed robbery, and Mickey Comeaux received 12 years in prison for attempted armed robbery, with an added penalty for armed robbery with a gun, court minutes say.

York, the victim, pleaded guilty to multiple drug and weapons counts in March 2014 in exchange for five years in prison and his testimony against the robbers, court minutes show.

Follow David J. Mitchell on Twitter, @NewsieDave.