A San Francisco lawmaker pleaded no contest after stealing nearly $2,500 of clothing from an upscale department store and a benign brain tumor may have impaired her judgment, her lawyer says.

Democratic Assemblywoman Mary Hayashi's lawyer says her medical condition might have played a role in her shoplifting, but her spokesman says she is not using it as an excuse, according to ABC station KGO-TV.

Hayashi, 44, was arrested in October for stealing leather pants and other articles of clothing from Neiman Marcus in Union Square. Prosecutors said before leaving the store, Hayashi took the clothes into a dressing room and stuffed them into an empty shopping bag.

Investigators say store security was tracking Hayashi after a saleswoman told guards she suspected the assemblywoman of stealing a dress the week before.

A spokesman hired by Hayashi to deal with the incident said she was going to pay for the items, but she was distracted by cell phone calls.

"She stepped outside the door, realized something was wrong, but before she had the opportunity to go back and correct her mistake, security was there," Sam Singer told KGO-TV.

When Hayashi appeared in San Francisco Superior Court on Friday, the judge reduced the charge from felony grand theft to a misdemeanor at a prosecutor's request. Hayashi pleaded no contest, and was given three years probation, a fine of $180 and ordered her to keep a distance of 50 feet from Neiman Marcus.

Hayashi's lawyer, Doug Rappaport, said outside the courtroom that she suffers from a medical condition that experts say may have affected her judgment when she was caught.

"Unfortunately, she's been diagnosed with a brain tumor, however, fortunately for her, it's benign and it can be taken care of and addressed with medication which is exactly what's happening," he said.

But her spokesman, Singer, sent an email Friday saying Hayashi's brain tumor "did not play a role in her forgetfulness and distraction in accidentally walking out."

The district attorney's office says Hayashi's medical condition did not have an impact on the judge's decision.

Regardless of the conflicting statements, the prosecution at the district attorney's office says the brain tumor had nothing to do with their decision to change the felony to a misdemeanor. They say she is a first-time offender with no priors and that she admitted her guilt early on.

"Her condition never factored into our decision," Stephanie Ong Stillman, a spokeswoman for the district attorney's office, told Seattle Post-Intelligencer.

District Attorney George Gascon said at a press conference before the hearing that his office would accept the judge's decision.

"She is a first-time offender. She has no criminal record. So while what she did is inexcusable and she needs to be held accountable for her actions, I think it's appropriate to examine and explore all the different possibilities," Gascon said.