DEL AIRE, Calif. (KTLA) -- A Los Angeles County sheriff's deputy who pleaded no contest to smuggling drugs into a courthouse jail in a burrito has been sentenced to two years in jail.

Henry Marin, 27, pleaded no contest to one count of bringing drugs into a jail. An earlier charge of conspiracy to commit a crime was dismissed, according to Deputy District Attorney Amy Pellman Pentz.

Marin was taken into custody immediately after sentencing.

According to prosecutors, Marin received the bean-and-cheese burrito from a woman who delivered it to him at the Airport Courthouse on Feb. 23, 2010.

The woman, who was cooperating with a sheriff's department investigation, told him she had been instructed to hide a hypodermic needle filled with heroin inside.

Marin accepted the hand-off and intended to smuggle the drugs into the courthouse jail, authorities said.

Detectives stopped the deputy before he went back into the courthouse.

Marin resigned from the SheriffÂ’s Department on April 24.

Officials say the case is one in a series of similar incidents that are helping fuel a lucrative drug trade behind bars.