A former Los Angeles County sheriff's deputy has been sentenced to two years in jail for attempting to smuggle drugs into a courthouse jail in a burrito.

Henry Marin was sentenced Monday and remanded into custody following the hearing. The 27-year-old pleaded no contest to one count of bringing drugs into a jail. A conspiracy count was dismissed.

Prosecutors say a woman who was cooperating with a sheriff's investigation handed Marin a burrito containing 24 grams of black tar heroin, according to the Los Angeles Times

The burrito exchange took place outside an Airport Courthouse courtroom were Marin was assigned. Investigators stopped the deputy before he went back into the courtroom.

Marin admitted to accepting the drug-laden food, which he was supposed to deliver to an inmate, but said he didn’t realize the package contained drugs, according to the Los Angeles Times. Some of the prison inmates went to the same high school as him, according to Time.

Facing the possibility of a three-year sentence, however, Marin agreed to plead guilty to lesser charges, Reuters reports.

"This guy has no guile," Marin’s attorney Donald Kelly told The Los Angeles Times after Monday's hearing. "I think he was someone who was taken advantage of.... He didn't realize any gain from it."

Marin had a moment in the national spotlight when he got kicked off the Fox reality television show “The Academy” in 2007. He got the boot for declining to call for backup when a suicidal woman pulled a gun on him and for forgetting the code to notify dispatchers of an emergency, according to Time.  

Los Angeles has long faced a problem with drug smuggling into the city’s prisons, with some pointing the finger at corrupt public officials, according to Reuters.  

Contains reporting from the Associated Press

Follow us on twitter.com/foxnewslatino
Like us at facebook.com/foxnewslatino