A former guard at a state prison in Southern California has been pleaded no contest to smuggling drugs and other contraband to fellow gang members behind bars.

Andre Pierre Scott entered the plea Tuesday and was immediately sentenced to four years in prison.

Scott was a guard at the state prison in Lancaster, northeast of Los Angeles. Prosecutors say in 2012 and 2013, Scott smuggled in heroin, marijuana, cellphones and other contraband to members of his gang, or distributed it after the goods were thrown over a prison fence.

Authorities say Scott was a member of a Pasadena street gang and worked for the state corrections department for about a decade.