SAN DIEGO (AP) — Felony charges are expected to be dropped against an attorney representing marijuana businesses in a case that stood out because of the aggressive tactics employed by the San Diego district attorney.

In an agreement signed Monday, the district attorney’s office has agreed to let attorney Jessica McElfresh plead guilty to an infraction for allowing a client to conduct an unpermitted marijuana manufacturing and distribution operation in 2015.

McElfresh had been accused of helping a client hide evidence of marijuana manufacturing. She denied the allegations.

Her case highlighted the risks of lawyers who wade into the legal gray zone of the burgeoning marijuana business where the drug is permitted at the state level but illegal under federal law.

According to the agreement, McElfresh promises to plead guilty in 12 months to violating San Diego’s municipal code, an infraction, which carries no jail time.

McElfresh’s lawyer, Eugene G. Iredale, applauded the decision by the new district attorney, calling it fair. McElfresh was charged under the previous district attorney.

“Jessica is a good and idealistic person. The law regarding marijuana is rapidly changing not only in California but throughout the nation,” he said. “Because of changing legal standards, it becomes very difficult for lawyers to advise their clients with absolute certainty as to what the law will be even the next day.”

The district attorney’s office said in a statement that the agreement “properly balances the interests of justice and provides accountability and fairness.”

The felony charge will stand if McElfresh does not meet all the terms of the agreement, including completing a state ethics exam and completing 80 hours of service work with an organization not affiliated with marijuana.

She also must not break any laws during that time.