AUGUSTA — A city woman who removed more than 13 grams of cocaine from a bodily orifice after police obtained a warrant to X-ray her will be able to avoid two felony drug convictions if she doesn’t commit a crime over the next year and a half.

The plea deal for Sarah Lyn Pearl, of Augusta, was approved Tuesday during a hearing at the Capital Judicial Center.

Pearl, 27, who also is recorded as having a Chelsea address, pleaded guilty to class C felony counts of unlawful furnishing of cocaine and trafficking in prison contraband, all of which occurred July 21 in Augusta. She was stopped by a Kennebec County Sheriff’s Office deputy at a Bangor Street convenience store.

Pearl was out on bail after having been indicted in June on a charge of unlawful possession of heroin, which allegedly occurred Dec. 12, 2014, in Augusta.

A police dog trained to identify cocaine, heroin and methamphetamine drugs indicated that Pearl had drugs on her, but she denied it. Once she was at the Kennebec County jail, deputies obtained a warrant to have Pearl undergo an X-ray at MaineGeneral Medical Center, but she admitted having the drugs on her. She turned over more than 13.2 grams of crack cocaine that had been hidden inside her vagina.

She was arrested on charges of unlawful possession of scheduled drugs, unlawful trafficking in scheduled drugs and trafficking in prison contraband. Pearl also was charged with violating conditions of release and attaching false license plates.

On Tuesday, all of the other charges, including the indictment, were dismissed in exchange for her pleas.

“She had no criminal history, and she’s been out on a Maine Pretrial Services contract for quite some time,” said Pearl’s defense attorney, Lisa Whittier. “I have full faith she will be able to come back in 18 months and withdraw her plea.”

Conditions of the deferred disposition require Pearl to pay $15 a month supervision fee to the district attorney’s office and to comply with other conditions.

“Sarah Lyn Pearl is a young, nonviolent drug offender addicted to drugs but with no prior criminal drug record,” District Attorney Maeghan Maloney said Tuesday via email. “The deferred (sentence) required her to spend time in jail, enroll in substance abuse evaluation and treatment and provide my office with the reports, (plus) be subject to random search and tests for 18 months.

Maloney noted that if Pearl successfully stays out of trouble, she’ll be convicted of a class D misdemeanor charge, and if she’s not successful, she will be sentenced on the two felonies.

“It gives her an opportunity to turn her life around but with oversight and extreme consequences if she is not successful,” Maloney said. Pearl already has spent 30 to 45 days in jail on the charges, she said.

In the meantime, Pearl is free on a personal recognizance bond that requires her to comply with the deferral conditions and prohibits her from contact with the two men from New York who were in the vehicle with her July 21 and the two women who apparently were in the vehicle with her in November.

The felony-level drug charges each carry a maximum penalty of five years in prison.

Betty Adams — 621-5631

[email protected]

Twitter: @betadams