Los Angeles (CNN) -- The first woman mayor of San Diego has acknowledged in court she misappropriated more than $2 million from her late husband's foundation to fund a casino gambling habit with which she allegedly won and lost $1 billion over nine years.
Her attorney said a brain tumor affected Maureen O'Connor's judgment in playing video poker. She's now broke and suffering cognitive impairment following brain surgery and a stroke in 2011, prosecutors said.
O'Connor, mayor of San Diego from 1986 to 1992, reported to the IRS more than $1 billion in casino winnings but also reported losses bigger than those winnings, resulting in a net loss from 2000 to 2009, prosecutors said in court papers.
Those net losses amounted to $13 million, her attorney said.
O'Connor was married to Robert O. Peterson, founder of the Jack in the Box restaurant chain, from 1977 until his death in 1994, but court documents don't disclose the size of the couple's fortune that apparently funded O'Connor's gambling habit.
O'Connor, 66, entered a deferred prosecution agreement Thursday in federal court in San Diego in which she admitted misappropriating money from the R.P. Foundation, on which she served as a trustee.
Under the agreement, she will repay the foundation $2,088,000, pay owed taxes, and be treated for her gambling addiction, prosecutors said.
O'Connor, however, is bankrupt and unable to work, court papers say. Her ability to repay the foundation is "limited," they say.
In 2011, surgeons removed a large tumor from O'Connor's brain, and she suffered complications that included cognitive impairment and a pulmonary embolism, prosecutors said. Magistrate Judge David Bartick found that her continuing health problems made it highly improbable she could be brought to trial, prosecutors said.
If O'Connor repays the foundation and satisfies the conditions of her deferred prosecution, the government will dismiss its prosecution in two years, prosecutors said.
She faces an unlawful monetary transaction charge carrying a maximum prison sentence of 10 years, documents say.
"Maureen O'Connor was a selfless public official who contributed much to the well-being of San Diego," U.S. Attorney Laura Duffy of San Diego said in a prepared statement. "However, no figure, regardless of how much good they've done or how much they've given to charity, can escape criminal liability with impunity."
O'Connor told reporters Thursday that for a while, she didn't know she had a brain tumor.
"There were two Maureens -- Maureen No. 1 and Maureen No. 2," she said. "Maureen No. 2 is the woman that did not know she had a tumor growing in her head."
She described that era as "the last chapter of my life where I lost my husband, I lost three of my siblings, I lost my two best friends and I had a difficult time.
"I think most of you who know me here would know that I never meant to hurt the city," she told reporters. She began to choke up and cry.
O'Connor was described as "a public figure and a civic treasure to the San Diego community" for 30 years, according to court papers filed by her attorney.
She is the eighth of 13 children of a mother who was a registered nurse and a father, Jerome, who was a boxer known as "Kid Jerome" and later became a prominent businessman, defense documents said.
She was elected to city council at age 25 in 1971 and, later as mayor, "put our city on the map as a destination for international tourism," partly by presiding over the completion of the city's Convention Center, defense documents said.
O'Connor's attorney attributed her gambling addiction to her medical condition.
"This was not, we think, a psychiatric problem or a characterological defect because there is substantial evidence that during this same time, there was a tumor growing in her brain, in the centers of the brain that affect and control, logic, reasoning and, most importantly, judgment," attorney Eugene Iredale said at a news conference Thursday.
O'Connor sat next to him with her head lowered.
O'Connor didn't plead guilty this week and the charge is played in abeyance for two years, Iredale said.
"It is fair to say in the last eight to 10 years a multiple amount of tragedies have befallen a person who was a great civic leader -- one of the sweetest, funniest people who ever existed in our city's history," the attorney said. "She suffered from terrible loneliness. She began around 2001 to gamble heavily."
"Although it's not fair of us to say there is no moral culpability, Maureen acknowledges doing something she ought not to have done," he added.
Photographs of her head after surgery show a fluid-filled cavity without brain matter at all, he said.
From 2000 to 2008, O'Connor gambled in Las Vegas, Atlantic City and San Diego casinos, court papers said. In 2008, when she became nearly broke, she began to siphon off funds from the R.P. Foundation and continued the activity into 2009, court documents said.
To fund her high-stakes gambling, she had liquidated her savings, sold several real estate holdings, auctioned valuables, and obtained a third mortgage on her home in La Jolla, California, the documents say.
O'Connor allegedly bankrupted the foundation and tried to avoid paying federal income taxes on the charity's money by characterizing what she took as "loans," court papers say.
"Despite having limited, if any, assets other than the funds misappropriated from the foundation, defendant continued high-stakes gambling," the documents say.
By March 2009, O'Connor allegedly had paid off casinos' gambling markers, or lines of credit, but hadn't repaid the foundation, prosecutors said.
She then enjoyed a streak of "several large gambling winnings after March 2009 that were used to continue gambling, not bring the foundation out of bankruptcy," court papers say.
Prior to 2008, the foundation funded such philanthropies as City of Hope, the Alzheimer's Association, Sharp Healthcare, Little Wishes Foundation, San Diego Hospice and the John Burton Foundation, authorities said.
CNN's Jaclyn Wang contributed to this report.