After she pleaded guilty in federal court to illegally distributing prescription pain medication, a Sterling doctor was able to obtain a coronavirus relief loan, some of which she used to pay her legal bills, and lied about being exposed to the virus to delay a hearing.

Felicia Donald, 65, was sentenced Tuesday to 84 months in prison.

“I am guilty and I know it,” Donald said in a letter to the judge in Alexandria federal court.I broke the trust of my profession and failed to live up to my duty.”

Donald, an obstetrician and gynecologist, set up a separate addiction center in 2016 where she liberally distributed opioids to about two dozen people she knew were selling or abusing the drugs, including her sister. Both her former assistant and office manager have pleaded guilty to related crimes.

Defense attorney Marvin Miller argued that Donald suffered a breakdown while trying to manage two doctors’ offices and care for an elderly father and mentally ill brother. He emphasized that Donald had volunteered her time performing surgery in rural Virginia and Guatemala, and made less than $25,000 from her pain practice.

“Word got out that she was an easy mark; you ask for a prescription, she will give it to you,” Miller said. “She wasn’t advertising.”

She has lost her medical licenses and her practice.

Miller also presented a medical report diagnosing Donald with a brain injury, including an MRI showing lesions in her brain and interviews with family who said her personality had changed.

Miller said Donald did not read the paperwork explaining that she no longer qualified for the Paycheck Protection Program after pleading guilty to two felonies. She has not been charged with fraud related to that loan.

She was released on bond but prosecutors moved to put her in jail after learning that she had received the $88,000 Small Business Administration loan, performed a sonogram when she should not have been practicing medicine and had spoken to her sister about the case. After her arrest, prosecutors say she claimed to have been exposed to the coronavirus and then called her sister from jail and admitted she made it up.

An FBI agent exposed to Donald, believing his immunocompromised child was at risk, had to self-quarantine in a hotel room for two weeks.

In a letter to the court, a friend and fellow physician who went to Eastern Virginia Medical School with Donald wrote that she was “often gullible” and sometimes practiced poor judgment but was “not greedy” or “a bad person.”

In text messages included in court records, Donald’s sister wrote that she was not an addict and would use pills for living expenses because she was “flat broke.” Donald promised she would make sure to get her sister 105 pain pills.

Prosecutor Raj Parekh dismissed the defense as retrospective attempts to rationalize Donald’s behavior.

“Even the people with whom she was the closest don’t know the other side of her, the criminal side,” he said. “She knows what she’s doing.”

Judge Leonie M. Brinkema agreed that Donald “does suffer . . . some degree of brain injury” that would explain in part her “change in behavior and lack of sound judgment.”

But, she said, the injury was not so severe that Donald was unable to understand and take responsibility for her actions. She directed that Donald be held at a prison medical center.