Henry Marin was assigned to provide courthouse security, but in 2010 prosecutors say the Los Angeles County sheriff's deputy strayed.
He poked his head out of his courtroom doors, according to an indictment, and spotted a woman who was there to sneak him a package.
Marin waved her over. The woman told him she had been instructed to hide the special delivery inside a burrito.
"OK ... no problem," the deputy said as he allegedly accepted the hand-off.
Inside that bean-and-cheese burrito was heroin that prosecutors say the deputy intended to smuggle into the courthouse jail.
On Wednesday, Marin, 27, surrendered to fellow deputies at the sheriff's South Los Angeles station. He pleaded not guilty to charges of bringing drugs into a jail and conspiracy to commit a crime.
The charges against him are the latest in a string of prosecutions and internal affairs investigations that have targeted corrupt sheriff's deputies and other department staff for delivering contraband behind bars, and helping fuel a lucrative drug trade behind bars.
Three sheriff's guards have been convicted and a fourth fired in recent years for smuggling or attempting to smuggle narcotics into jail for inmates.
The porous nature of the jails was highlighted last year when The Times revealed that FBI agents conducted an undercover sting in which a deputy was accused of taking $1,500 to smuggle a cellphone to an inmate working as a federal informant. Federal authorities are investigating reports of brutality and other misconduct by deputies.
The full scope of the smuggling problem is hard to quantify, and the players within the trade extend far beyond sheriff's employees, officials say. The department has seen a significant increase in drug seizures across county lockups over the last few years, but it is impossible to know how much of that involves guards.
In a sign of how serious officials consider the smuggling problem to be, the Sheriff's Department recently recorded a former deputy, now in state prison, as he explained what led him to help inmates sneak in heroin, marijuana and methamphetamine.
In the video, Peter Felix tearfully recounts from behind bars how his fall from grace started with taking a burrito to an inmate. The video is meant to serve as a cautionary tale for other deputies.
In Marin's case, prosecutors allege that at least two other unnamed individuals conspired with him. According to the indictment, one of those individuals contacted the other to discuss using a deputy to get narcotics into the Airport Courthouse jail.
Several days later, the two met at a sheriff's jailhouse. One instructed the other to get the drugs and stuff them into a "food item," the indictment states.
After following those instructions, the woman took the package to a specific courtroom at the Airport Courthouse, where she allegedly met with Marin and completed the hand-off.
Authorities said Marin has been relieved of duty. He was released from custody Wednesday on $25,000 bail.
"We take this very seriously," said sheriff's spokesman Steve Whitmore. "This kind of behavior is absolutely inexcusable for anybody, especially a law enforcement representative."
Los Angeles Times staff writer Andrew Blankstein contributed to this report.