PHOENIX — A judgment that resolved a consumer-fraud lawsuit against an attorney cannot be used against him in a pending attorney-disciplinary case, the Arizona Supreme Court ruled Wednesday.

The 6-to-1 decision was made in an appeal filed on behalf of attorney Brent Randall Phillips, who was accused in a lawsuit filed by the state of using fraudulent and deceptive practices in offering loan-modification services to Arizona homeowners who were facing foreclosure.

Phillips acknowledged in the 2015 judgment reached between him and the state that his actions violated Arizona’s consumer fraud act and agreed to pay restitution and fines, according to the ruling.

In the lawsuit, the state alleged Phillips had mailed deceptive advertisements to Arizona consumers that led them to mistakenly believe they were eligible for reductions in their mortgage payments or interest rates, according to the lawsuit. The suit said the ads were worded in such a way that let some people believe it was sent by mortgage lenders.

The State Bar of Arizona, which regulates attorneys within the state, wanted to use the judgment to call into question Phillips’ testimony in his disciplinary case if it differs from facts contained within the judgment. It was seeking to use the facts within the judgment to show Phillips’ advertisements violated the rules of professional conduct for attorneys.

The state’s highest court said a judge made a mistake in ruling the State Bar could introduce facts within the judgment in the disciplinary case for the purpose of calling into question Phillips’ testimony.

The state Supreme Court said one of Arizona’s rules of evidence bars the use of facts within such a consent judgment within another case, explaining that doing so would discourage settlements of cases.