The final defendant in a South Texas drug and gun smuggling case that included two sheriff's deputies has pleaded guilty just before his case was to go to trial.