SAN DIEGO -- Maureen O'Connor was a physical education teacher who won a seat on the San Diego City Council when she was only 25 years old, later winning two terms as the city's first female mayor as she charmed voters with a populist flair.

But her rapid rise was matched by her fall, culminating Thursday when she acknowledged in federal court that she took $2.1 million from her late husband's charitable foundation during a decade-long gambling spree in which she won – and lost – more than $1 billion.

O'Connor pleaded not guilty to a money laundering charge in an agreement with the Justice Department that defers prosecution for two years while she tries to repay the foundation and receives treatment for gambling.

O'Connor, 66, once had a personal fortune that her attorney estimated between $40 million and $50 million, inherited from her husband of 17 years, Robert O. Peterson, founder of the Jack in the Box Inc. fast-food chain. She is now virtually broke, living with a sister.

O'Connor walked across the courtroom with a cane, appearing frail and struggling to maintain composure at one point as her attorney wrapped his arm around her shoulder and placed his hand on her head.

At a news conference, she said she always intended to repay the foundation and appeared to blame her behavior on a brain tumor that was diagnosed in 2011.

"There are two Maureens – Maureen No. 1 and Maureen No. 2," said O'Connor, who declined to take questions. "Maureen No. 2 is the Maureen who did not know she had a tumor growing in her brain."

O'Connor's game of choice was video poker at casinos in San Diego, Las Vegas and Atlantic City, N.J. Her attorney, Eugene Iredale, said she played for hours at a time.

She won about $1 billion from 2000 to 2009, according to winnings that casinos reported to the Internal Revenue Service, but lost even more. Iredale said her net gambling losses topped $13 million.

News of O'Connor's gambling troubles and financial ruin elicited sympathy in her hometown. Magistrate Judge David Bartick told her that she left "a very strong legacy in the city of San Diego."

The U.S. attorney's office said O'Connor's medical condition influenced the decision to strike a deal, saying it may have been impossible to bring the case to trial. The tumor was removed but doctors submitted letters detailing significant ailments.

"Maureen O'Connor was a selfless public official who contributed much to the well-being of San Diego," said U.S. Attorney Laura Duffy. "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, the eighth of 13 children whose father was a boxer and nightclub owner and mother was a registered nurse, was elected to the City Council three years after graduating from San Diego State University. She was mayor from 1986 to 1992, San Diego's only Democratic leader over a four-decade span. She promoted community policing, championed the arts and oversaw completion of a downtown convention center.

O'Connor began gambling around 2001 as she struggled with pain and loneliness from the death of her husband from leukemia in 1994 and the passing of several close friends, said Iredale, who called it "grief gambling" in a court filing. Within four years, she was betting heavily.

O'Connor acknowledged taking $2.1 million from the R.P. Foundation between September 2008 and March 2009 to pay gambling debts, wager more and cover living costs. She was one of three trustees of the foundation, a nonprofit organization that supported the Alzheimer's Association, City of Hope, San Diego Hospice and other charities.

Her annual gambling winnings peaked at more than $200 million, said Phillip Halpern, an assistant U.S. attorney. Prosecutors said they didn't know exactly how much she lost but that she also borrowed money from friends and sold property to gamble.

O'Connor sold a home in tony La Jolla for $2.5 million in 2010 that is down the street from former Republican presidential nominee Mitt Romney.

She also sold the Heritage House Hotel in the Northern California coastal town of Mendocino for $7.5 million in 2005 to investors who defaulted, Iredale said. She sued and plans to turn over any damages to repay the foundation.

Also on HuffPost:

Loading Slideshow...
  • Barack Obama

    US President Barack Obama laughs while speaking during a campaign event at the Cincinnati Music Hall in Cincinnati, Ohio , July 16, 2012. AFP PHOTO / Saul LOEB (Photo credit should read SAUL LOEB/AFP/GettyImages)

  • Mitt Romney and Nikki Haley

    HILTON HEAD ISLAND, SC - JANUARY 13: Republican presidential candidate, former Massachusetts Gov. Mitt Romney (L) and South Carolina Gov. Nikki Haley, a Republican, laugh as they listen to U.S. Sen. John McCain (R-AZ) speak during a campaign rally at the Hilton Oceanfront Resort on January 13, 2012 in Hilton Head Island, South Carolina. Romney continues to campaign for votes in South Carolina ahead of their primary on January 21. (Photo by Joe Raedle/Getty Images)

  • Bill Clinton and Carlos Slim

    Former US President Bill Clinton and Mexican businessman Carlos Slim laugh during the signing of an agreement for economic support to Colombia, Mexico and Peru in Mexico City, on August 4 2008. AFP PHOTO/Luis ACOSTA (Photo credit should read LUIS ACOSTA/AFP/Getty Images)

  • Hillary Clinton and David Cameron

    WASHINGTON, DC - MARCH 14: Secretary of State Hillary Clinton (L) and British Prime Minister David Cameron share a laugh during a lunch hosted at the State Department on March 14, 2012 in Washington, DC. Cameron is on an official visit to Washington, where President Obama will host him at a State Dinner tonight. (Photo by Brendan Hoffman/Getty Images)

  • Joe Biden and Barack Obama

    US President Barack Obama (R) laughs alongside US Vice President Joe Biden prior to signing the healthcare insurance reform legislation during a ceremony in the East Room of the White House in Washington, DC, March 23, 2010. Obama Tuesday signed into law sweeping reforms that will for the first time ensure health care coverage for almost every American. AFP PHOTO / Saul LOEB (Photo credit should read SAUL LOEB/AFP/Getty Images)

  • Al Gore

    SAN FRANCISCO - OCTOBER 11: Former U.S. Vice President Al Gore laughs as he attends a fundraiser for U.S. Sen. Barbara Boxer?s (D-CA) 2010 re-election campaign October 11, 2007 in San Francisco, California. Al Gore is nominated for the 2007 Nobel Peace prize for his efforts to bring attention to global warming. The prize winner will be announced on October 12. (Photo by Justin Sullivan/Getty Images)

  • George W. Bush

    US President George W. Bush watches the women's preliminary basketball match between the US and Czech Republic at the 2008 Beijing Olympic Games in Beijing on August 9, 2008. AFP PHOTO/Gabriel Bouys (Photo credit should read GABRIEL BOUYS/AFP/Getty Images)

  • Sarah Palin

    Republican vice presidential cadidate Sarah Palin (L) shares a laughter with supporters at the end of a campaign rally at the Home Depot Center in Carson on October 4, 2008. AFP PHOTO/Jewel SAMAD (Photo credit should read JEWEL SAMAD/AFP/Getty Images)

  • John Boehner and Byron Dorgan

    WASHINGTON - MAY 20: House Minority Leader John Boehner (R-OH) (C) and Sen. Byron Dorgan (D-ND) laugh before a joint session of the U.S. Congress on the floor of the House House of Representatives at the U.S. Captiol May 20, 2010 in Washington, DC. Mexican President Felipe Calderon addressed the joint session and talked about immigration and asked the Congress to reinstate the assult weapons ban to help control the flow of weapons into Mexico from the United States. (Photo by Chip Somodevilla/Getty Images)

  • Dick Cheney

    LARAMIE, WY - SEPTEMBER 27: U.S. Vice President Dick Cheney laughs during an exchange with former U.S. Senator Al Simpson at a fund-raiser for the University of Wyoming Foundation September 27, 2002 in Laramie, Wyoming. (Photo by Michael Smith/Getty Images)

  • Michele Bachmann

    WASHINGTON, DC - JANUARY 05: U.S Rep. Michele Bachmann (R-MN) (2nd L) laughs with colleagues after Rep. John Boehner was elected the new Speaker of the House January 5, 2011 in Washington, DC. The 112th U.S. Congress was sworn-in today, with Republican legislators taking control of the House of Representatives and expected to begin attempts to dismantle portions of U.S. President Barack Obama’s legislative agenda. (Photo by Alex Wong/Getty Images)

  • John McCain

    Republican presidential candidate John McCain laughs at a joke made by Senator Joe Lieberman during a campaign rally the Henderson Pavilion in Henderson, Nevada on November 3, 2008. One day before the US presidential election McCain is making a seven-state cross-country blitz in the effort to win votes in the contest against Democratic opponent Barack Obama. AFP PHOTO /Robyn BECK (Photo credit should read ROBYN BECK/AFP/Getty Images)

  • Ronald and Nancy Reagan

    402010 02: Former U.S. President Ronald Reagan and First Lady Nancy Reagan share a laugh in this undated file photo. The couple celebrated their 50th wedding anniversary on March 4th 2002. (Photo courtesy Ronald Reagan Presidental Library/Getty Images)