Former D.C. mayor Marion Barry pleaded guilty yesterday to two misdemeanor tax charges, admitting in federal court that he failed to pay most of his income taxes for five years after departing from the District government in 1999.

Barry, who returned to politics last year after being elected to represent Ward 8 on the D.C. Council, earned more than $530,000 during his five-year hiatus from office but never filed a tax return documenting the income, prosecutors said.

Outside the courthouse, Barry voiced regret but offered no explanation. "I made a mistake," he said in brief remarks after the plea.

Barry (D), who faces up to 18 months behind bars and criminal fines of up to $30,000, will seek probation when he is sentenced Jan. 18, his attorney, Frederick D. Cooke Jr., said in court. It was, coincidentally, on that date in 1990 that Barry was arrested at the Vista Hotel after being videotaped smoking crack, an image that for years has haunted him and the city he led. Prosecutors said they will take no position on Barry's sentence.

The tax investigation centered on Barry's income in the years after he left the mayor's office in January 1999. The Internal Revenue Service started sending him delinquency notices in 2002 and continued to do so for about three years. Earlier this year, with the taxes still unpaid, a criminal investigation was launched.

A grand jury began hearing evidence of the alleged fraud, and the prospect of felony charges loomed for Barry, who is 69 and no longer the indefatigable figure he was earlier in his political career. A cancer survivor, Barry has diabetes and high blood pressure and has been hospitalized at least three times this year.

With the potential consequences apparent, Barry and his attorney moved swiftly to bring the investigation to a close, according to prosecutors. After being informed of the criminal inquiry, Barry immediately agreed to file returns, pay all taxes due and admit his crimes, the prosecutors, Assistant U.S. Attorneys James W. Cooper and Thomas E. Zeno, said in papers presented yesterday in court.

Barry, his attorney and prosecutors have been working toward a plea agreement for the past few weeks. Because the charges are misdemeanors, not felonies, Barry will be able to remain on the council. He signed off on the agreement yesterday morning, and hours later, he was in the courtroom.

Wearing a charcoal suit, a dark tie and a white shirt with monogrammed French cuffs, Barry listened as Cooper outlined the offenses to Magistrate Judge Deborah A. Robinson. Asked by Robinson whether the allegations were true, Barry paused briefly and said, "Yes, it's accurate."

Charged with one count of failing to pay his federal income taxes and one count of failing to pay his District taxes, both for calendar year 2000, Barry was summoned to a podium in the well of the courtroom to enter his plea.

After each charge was read by courtroom clerk Lorita Miller, Barry said, "Guilty, your honor."

Investigators found no evidence of tax evasion, the prosecutors said. Tax evasion -- a felony charge -- is the deliberate misrepresentation of income records in an effort to lower the amount of taxes owed.

Sources close to the investigation said that Barry was not charged with tax evasion because some employers had withheld taxes and some tax forms had been filed, which proved that he was not trying to hide his income.

Barry has agreed to make arrangements with the IRS to resolve his tax debt, which is a civil matter.

During the five years when his taxes went unpaid, Barry did not have a regular job or salary, but he took on a variety of projects.

He was hired as a consultant for several companies, including M.R. Beal & Co., an investment banking company that paid him more than $250,000 over five years. He also did consulting work for the Vienna-based developer KSI Services Inc. and National Corrections and Rehabilitation Corp., a company that operated group homes.

In an interview during last year's council campaign, Barry acknowledged that money was tight. He added, "I ain't too proud to beg."

As a council member, Barry is paid $92,520 a year. He also is eligible to receive a $34,000 annual pension from the government.

Barry's political career goes back more than three decades. He was elected mayor in 1978 and easily won reelection to second and third terms. He was in his third term when the FBI videotaped him smoking crack at the Vista; he later was convicted of one count of misdemeanor drug possession.

Soon after completing a six-month prison sentence, Barry launched a political comeback. He won a D.C. Council seat in 1992 and a fourth term as mayor two years later.

Mayor Anthony A. Williams (D) said in a statement that he is pleased that Barry's tax matters are being resolved.

"I've always admired Marion Barry; however, no one is above the law -- everyone needs to file both their federal and District taxes on time and accurately," Williams's statement said. "I understand that former Mayor Barry has agreed to make full restitution, and now I look forward -- and I am sure that he does too -- to moving on to other issues."

The tax bills, though, are not the only expenses Barry faces over legal issues. He has yet to fully pay a $35,000 court judgment stemming from a run-in with a custodian at Baltimore-Washington International Airport in 2000.

The custodian, Terrie Jenkins, accused Barry in a lawsuit of shoving her and exposing himself in an airport bathroom. Her attorney, Barry Glazer, said that Barry failed to make payments, so his paycheck is being garnished $1,131 a month.

Barry also has not settled a dispute over money with Dion Jordan, who served as the campaign manager in his bid for the Ward 8 council seat last year. Jordan alleged that the campaign owed him $3,700, and he got a court judgment ordering Barry and the campaign to pay up; Jordan said he is still owed about $1,500.

Barry and his fourth wife, Cora Masters Barry, separated in 2002, and he has since lived in a couple of apartments, including his current residence in Southeast Washington. A year after the separation, some of Barry's close advisers established a trust to help pay his rent and other personal expenses.

Marion Barry, saluting well-wishers outside court, earned more than $530,000 during his hiatus from office but never filed a tax return documenting it.Linda Green, a Barry staff member, tells reporters that the council member and ex-mayor will make no further comment after his court appearance.