A former state Department of Health and Hospitals accountant admitted Thursday that she swindled more than $1 million from Louisiana’s Medicaid program over several years and frittered it away at Baton Rouge casinos.

Deborah Crowder Loper, in her role at DHH, had been entrusted to manage a bank account opened on behalf of the National Association of State Human Services Finance Officers in order to facilitate the association’s 2009 conference in New Orleans. DHH hosted the event.

Loper was told to close the account after the conference but instead fabricated documents making it appear it had been closed and changed the address on it so she could receive monthly statements at her home. She ended up diverting roughly 167 checks — issued to DHH totaling more than $1 million — to the account for her personal use.

“She basically used that account as an ATM to support her gambling habit,” Fred Duhy, an assistant state attorney general, told state District Judge Chip Moore moments before Loper pleaded guilty to one count each of felony theft by fraud and malfeasance in office.

Loper, 47, of Baton Rouge, replied “Yes, your honor,” when Moore asked her if she admitted to the facts laid out by Duhy.

Loper’s attorney, Steven Moore, told the judge that she has received treatment for a severe gambling addiction.

Loper is expected to serve five years in prison, followed by five years of probation, under the terms of a plea agreement.

The judge will sentence her Dec. 4. At that time, a pending money-laundering charge will be dismissed.

Loper must pay $1,018,423 in restitution to the state, the amount she stole from DHH from fall 2009 until early 2013. The money included funds intended as Medicaid reimbursements.

“Ms. Loper stole more than a million dollars of taxpayer money meant for vital health care services for our most vulnerable Medicaid recipients. This outrageous behavior that erodes public trust and confidence in state government will not be tolerated,” Attorney General Buddy Caldwell said in a prepared statement.

Loper also agreed Thursday to meet before her sentencing with DHH’s compliance officer, Bill Root, in an effort to help the agency avoid a repeat of what happened in her case.

DHH took steps to limit employees dealing with checks in the wake of the Loper situation.

“We have implemented a number of safeguards aimed at preventing fraud and theft within our Department,” Root said in the statement released by Caldwell’s office. “Individuals who seek to steal from government are ultimately stealing from all Louisiana residents, especially those who need the services paid for with state funds.”

Duhy told the judge that Loper has been cooperative but stressed, “You can’t sugarcoat what she did.”

Loper’s scheme apparently went unnoticed until February 2013 when she inadvertently deposited one of the DHH checks — for more than $40,000 — into her personal account, an oversight she at first sought to explain away as an accidental deposit made by her secretary, an arrest warrant said.

A lawsuit the state filed against Loper and a bank where the money was deposited is pending.

Loper, who was arrested in June 2013, had been employed by DHH’s Division of Fiscal Management since April 2005. She left DHH in March 2013.

Loper was the manager of the financial management section, which was responsible for depositing DHH revenue, reconciling bank statements and completing federal and state financial reports.