Actress Rose McGowan pleaded no contest Monday to a charge of misdemeanor possession of a controlled substance and was ordered to pay a $2,500 fine and serve a 12-month suspended sentence with no jail time by a Loudoun Circuit Court judge.

McGowan, 45, was originally charged with felony possession of cocaine after a member of a cleaning crew found her wallet with white powder inside on an airplane at Dulles International Airport on Jan. 20, 2017. Metropolitan Washington Airports Authority police said the powder tested positive for cocaine and obtained a felony warrant for McGowan in February. An MWAA detective testified that he called McGowan the day after her flight arrived to say that her wallet had been found and that she should come pick it up. But McGowan never did.

McGowan surrendered to the charge in November, and her attorneys raised the possibility that the cocaine was planted by someone connected with movie producer Harvey Weinstein. McGowan was one of the first women to accuse Weinstein of sexual assault at the outset of the #MeToo movement, and Weinstein has subsequently been charged in connection with another case.

Possession of cocaine, regardless of the amount, is considered a felony in Virginia. But first-time offenders are typically allowed to plead guilty to a reduced misdemeanor charge.

“Sometimes you have to lose the battle to win the war,” McGowan told the WTOP radio station after the hearing, “and I’m in it for the long haul. And that’s what’s going on. Once you get tangled in the legal system, it’s very hard to get out of it. Sometimes you just take what you can get and hope for the best.” McGowan told WTOP’s Neal Augenstein the case had “caused a lot of stress and I just wanted it to be over. However it ended, I just wanted it to be over.”

The case was prosecuted by the Prince William County Commonwealth’s Attorney’s Office because Loudoun Commonwealth’s Attorney Jim Plowman had previously been represented by McGowan’s attorney Jim Hundley. During a preliminary hearing in May, prosecutor Rebecca Thacher argued that McGowan had illegally possessed cocaine and that “all of a sudden, she did not want to pick up her Chanel wallet. … Ms. McGowan was on that plane. The cocaine was in her wallet.” McGowan flew into Washington to participate in the 2017 Women’s March.

After the no-contest plea, Prince William Commonwealth’s Attorney Paul B. Ebert said, “Her case should be treated like everyone else. It’s rare for a first offense like this to get jail time these days.” The plea agreement was accepted and imposed by Circuit Court Judge J. Howe Brown.

Justin Jouvenal contributed to this report.