AUGUSTA — A city man will spend half a year behind bars for possessing heroin in the Kennebec County jail, and his girlfriend faces charges of supplying it to him.

William L. Wilkinson, 27, of Augusta, pleaded guilty Tuesday in Kennebec County Superior Court to unlawful possession of heroin and trafficking in prison contraband that occurred Nov. 12, 2014.

He was sentenced to two years in jail, with all but 180 days suspended, two years of probation and fined $400.

Wilkinson’s girlfriend, Meredith Prugh, 34, hid a heroin packet on the back of her necklace and passed the drug to Wilkinson during a contact visit, according to an affidavit by Kennebec County Sheriff’s Deputy Michael Bickford. An investigation began the next day because Wilkinson fell asleep while working in the jail kitchen, Bickford wrote, and a search of Wilkinson’s possessions located the heroin packet inside a folded up piece of paper that was hidden inside a deodorant stick.

Bickford wrote that video footage shows Prugh passing the drug to Wilkinson, and that she later admitted bringing it into the jail for Wilkinson.

A charge of trafficking in prison contraband remains pending against Prugh, according to records in Kennebec County Superior Court.