Will Glaspy, an official with the Drug Enforcement Administration in Houston who is in charge of the agency’s operations in the Rio Grande Valley, said he believed law enforcement corruption was happening in the region at the same rate as in other parts of the country. When information surfaces that an officer might be working the other side of the law, he said, those leads are vigorously pursued.

“The overwhelming majority of the law enforcement officers, whether they’re federal, state or local, are there to do a good job and serve the community,” Mr. Glaspy said. “Unfortunately, we have a few bad apples, like every area of the country, where bad guys become law enforcement officers, and they tarnish the badge.”

In one case, an officer in a police cruiser had to interrupt a drug-vehicle escort to respond to a police call, because the officer was on duty at the time. Some officers have jeopardized long careers and violated their oaths for a few thousand dollars. Mr. Hale received $1,000 and the other former Laredo officer, Pedro Martinez III, $2,000. Mr. Beas, the former Pharr officer, was paid $12,000 for escorting drug vehicles on three occasions, and was sentenced in 2011 to 12 years in prison, the authorities said.

Often, the people whom the officers believed were drug traffickers were actually undercover federal agents or confidential informants working with investigators. The vehicles that the officers believed were carrying narcotics often contained no drugs at all, or investigators had placed the drugs in other vehicles.

Al Alvarez, a lawyer who is representing Mr. Espinoza, the Mission officer arrested last month, criticized the corruption investigations, saying the officers were often set up and “enticed” by confidential informants who themselves were in trouble with the law.

“We have real crime here in the Valley and there’s real loads of cocaine going north,” said Mr. Alvarez, who also represented Mr. Beas, the former Pharr officer. “It always befuddles me how we are setting up cops with confiscated cocaine when there’s real crime going on. Why are they creating incentives for police officers to go bad?”