A former D.C. police sergeant was sentenced to 18 months in prison Friday for stealing about $40,000 from an elderly woman she met while investigating a scam against her.

The officer tried to cover up the theft by saying the victim suffered from memory loss.

D.C. Superior Court Judge Ronna L. Beck said the charges against Aisha Hackley, 36, “demanded incarceration.” According to prosecutors, Hackley stole checks from the 85-year-old woman to fund a lavish lifestyle from February to May 2011.

Hackley, an 11-year veteran, met the woman after she called police in 2010 to report a lottery scam in which money was being taken from her bank account. Authorities said Hackley, having gained the victim’s trust during the investigation, then began stealing from the same bank account.

Hackley made checks out to herself and her son, a college student. When bank officials questioned the victim and Hackley about the checks, Hackley told bank executives that the woman did not remember writing the checks because she suffered from memory loss. On several checks, Hackley had written in the memo line that the money was for “security services.”

Hackley was arrested in June. In August, she pleaded guilty to one count of first-degree theft from a senior citizen. As part of her plea, Hackley resigned from the police department, where she was assigned to the 2nd District. Hackley was scheduled to be sentenced in the fall, but the hearing was postponed to allow her time to withdraw money from her police pension so she could repay her victim.

In letters to the judge, Hackley’s family and friends, many of whom sat in the courtroom wiping tears and sobbing during the sentencing, said Hackley was under financial pressure because her husband was not working because of a disability. She was the sole provider for her family, which included five children and two foster children.

But Assistant U.S. Attorney Stephanie Miller read from a list of purchases that Hackley had made with her debit card during that time, including payments to Rosenthal Jaguar, Burlington Coat Factory, Best Buy, T.G.I. Friday’s and IHOP, a day spa and her cable company. Miller said Hackley also used the money to pay her son’s college tuition and to throw a party for her own recent graduation from George Washington University.

“She spent $19,000 in one month. This was the victim’s money,” Miller said. “This is living beyond one’s means and stealing those means from someone else.”

Miller said Hackley wrote 14 checks from the victim’s accounts totaling $40,005. “She swore and took an oath to protect and serve. She tarnished the badge,” Miller said.

The victim was not in court Friday, but Miller read a statement from her: “What a fool Sergeant Hackley made of an old woman like me. I never thought a police officer would do this to me.”

As part of the plea agreement, Hackley could have faced six to 36 months in prison. Prosecutors asked for 18 months.

Reading from a statement and standing next to her attorney, Hackley apologized to the victim, her family and friends, and to her former colleagues.

“There is no excuse for my actions. My parents raised me to be a strong, Christian woman, hardworking,” Hackley said, at times her voice breaking. “But somewhere along the line, I let my problems cloud my judgment.”