EL PASO - She lived a double life. At the border crossing, she was Agent Garnica, a veteran law enforcement officer. In the shadows, she was "La Estrella," the star, a brassy looker who helped drug cartels make a mockery of the U.S. border.

Martha Garnica devised secret codes, passed stacks of cash through car windows and sketched out a map for smugglers to safely haul drugs and undocumented workers across the border. For that she was richly rewarded; she lived in a spacious house with a built-in pool, owned two Hummers and vacationed in Europe.

For years, until an intricate sting operation brought her down in late 2009, Garnica embodied the seldom-discussed role of the United States in the trafficking trade.

Cartels based in Mexico, where there is a long history of corruption, increasingly rely on well-placed operatives such as Garnica to reach their huge customer base in the United States. It is an argument often made by Mexican officials - that all the attention paid to corruption in their country has obscured a similar, growing problem on the U.S. side of the border.

The cartels have grown so sophisticated, law enforcement officials say, that they are employing Cold War-era spy tactics to recruit and corrupt U.S. officials.

"In order to stay in business, the drug trafficking organizations have to look at different methods for moving product," said Thomas Frost, an assistant inspector general in the Department of Homeland Security. "The surest method is by corrupting a border official. The amount of money available to corrupt employees is staggering."

In late August, Garnica's double life ended. U.S. District Judge David Briones sentenced her to 20 years in prison after she pleaded guilty to six counts of drug smuggling, human trafficking and bribery. She was, in the words of prosecutors, a "valued asset" of the crime syndicate La Linea based in Ciudad Juarez, Mexico, directing the movements of at least five men, four of whom are in prison or dead.

"Everybody makes mistakes," she said in court, wearing handcuffs and an orange prison jumpsuit. "I take responsibility for my mistakes."

Garnica's saga - pieced together from hundreds of pages of court testimony, tape-recorded conversations, and interviews with border officials, investigators, undercover agents and members of the judiciary - underscores the enormous challenge facing the United States as it tries to curtail the $25 billion-a-year business of illegal drug trafficking.

Corruption is on the rise in the ranks of U.S. law enforcement working the border, and nowhere is the problem more acute than in the frontline jobs with Garnica's former employer, U.S. Customs and Border Protection, according to federal investigators. Garnica's stiff sentence represented a rare victory in the struggle to root out tainted government employees.

Homeland Security statistics suggest the rush to fill thousands of border enforcement jobs has translated into lower hiring standards. Barely 15 percent of Customs and Border Protection applicants undergo polygraph tests and of those, 60 percent were rejected by the agency because they failed the polygraph or were not qualified for the job, said Sen. Mark Pryor (D-Ark.), who oversees a Senate subcommittee on homeland security.

The number of CBP corruption investigations opened by the inspector general climbed from 245 in 2006 to more than 770 this year. Corruption cases at its sister agency, U.S. Immigration and Customs Enforcement, rose from 66 to more than 220 over the same period. The vast majority of corruption cases involve illegal trafficking of drugs, guns, weapons and cash across the Southwest border.