A federal judge on Friday sentenced two brothers who worked as Border Patrol agents to at least 30 years in prison for smuggling hundreds of immigrants into the United States.

U.S. District Court Judge John Houston sentenced Raul Villarreal to 35 years for leading the smuggling ring. His brother, Fidel Villarreal, was sentenced to 30 years for managing the operation.

The sentences are among the longest given to border law enforcement officials.

Houston said he gave the severe sentences to deter others. The judge called their smuggling operation “disgusting” and a threat to national security.

The brothers were accused of helping more than 500 migrants cross the border from Mexico.

Prosecutors said Raul Villarreal — who made television appearances as an agency spokesman and once played the role of a smuggler in a public service ad —recruited his brother to his ring that smuggled in Mexicans and Brazilians. One Brazilian woman told investigators she paid $12,000 to cross the border.

Federal officials said they also took bribes from public officials.

The federal probe began in May 2005 when an informant tipped off Immigration and Customs Enforcement officials. Investigators installed cameras in areas where migrants were dropped off, planted recording devices and placed tracking instruments on Border Patrol vehicles. They also trailed the ring’s smuggling operations by airplane.

Prosecutors said when the brothers learned they were being investigated in June 2006, they quit their jobs and fled to Mexico.

Two years later, the brothers were arrested. They were extradited to the U.S. and charged with human smuggling, witness tampering and bribery.

Raul Villarreal’s attorney, David Nick, had argued the prosecution’s witnesses were not credible and surveillance yielded no evidence of wrongdoing by his client.

Fidel’s attorney, Zenia Gilg, echoed that argument, saying the prosecution’s case rested largely on two alleged accomplices who were promised leniency for testifying and “inconsistent statements” from migrants.

The Border Patrol has suffered a string of embarrassments since doubling its size in less than a decade, including the case of an agent who pleaded guilty in April to smuggling marijuana while on duty along the Arizona-Mexico border.