The District’s former chief administrative law judge admitted to ethics violations Tuesday, agreeing to pay a $20,000 fine in a settlement that brings a week-long trial before the D.C. government’s ethics board to an early end and closes out more than two years of investigations.

Mary Oates Walker, who headed the D.C. Office of Administrative Hearings from 2010 until May, faced 17 counts of wrongdoing connected to alleged contract steering, conflicts of interest, retaliation against subordinates and lying to investigators.

Under the settlement signed Tuesday, Walker admitted to four violations of city laws and regulations prohibiting the appearance of conflicts of interest and “preferential treatment.” The violations are rooted in episodes in which she hired a friend and business partner as her general counsel and later steered an agency contract to a firm owned by that friend’s future husband.

Walker faced up to a $5,000 fine for each of the 17 counts before the board. The settlement and other allegations could also result in bar sanctions for Walker, a Howard University-trained lawyer who previously worked for the Hershey Co.

“I think the result here shows that all of us in the District government are accountable, even a chief judge of a District agency,” said Darrin P. Sobin, director of government ethics for the Board of Ethics and Government Accountability.

Anthony Conti, an attorney for Walker, characterized her admissions in the settlement as “technical violations relating only to the appearance of conflict of interest, rather than an actual conflict” and noted that previous reviews, including by the District’s inspector general, did not result in findings of wrongdoing.

Conti said Walker would seek to be reinstated as chief administrative law judge, saying the settlement undermined Mayor Vincent C. Gray’s decision to fire her after the ethics charges were leveled in February. Walker fought the move in court, but Gray prevailed.

“We are pleased that our client has again been vindicated as part of this process,” Conti said in an e-mail. “Given that all of the serious charges relied upon by Mayor Gray to discharge Walker are being dismissed, . . . Walker intends to continue to pursue her appeal to overturn Mayor Gray’s imprudent disciplinary decision.”

The board dropped allegations that Walker lied to investigators as well as charges directly related to a long-running feud between Walker and her subordinate administrative law judges, who handle disputes over various governmental matters such as welfare eligibility and licensing applications.

The rift emerged in 2012, when 15 judges signed a letter accusing her of being “unprofessional, erratic, and at times demeaning.”

Walker and her allies sought to portray her as the victim of disgruntled subordinates upset about reforms meant to improve standards and accountability among underperforming judges who had amassed a backlog of undecided cases.

Board investigators charged lawyer Kiyo Oden Tyson, the friend and business partner hired by Walker as general counsel, alongside Walker when they unveiled their allegations in February. Tyson, however, entered into a settlement with the board this month, agreeing to testify against Walker days before the trial was set to begin.

In testimony to the board July 14, Tyson described her ongoing personal and professional relationship with Walker, including workings of a real estate business the two shared as well as Walker’s knowledge that Tyson’s then-boyfriend owned the company selected to move the agency to new offices.

The three-member board heard testimony throughout last week from witnesses called by investigators; Walker was expected to call several of her own witnesses this week, including several administrative and Superior Court judges, but settlement negotiations resumed after testimony from only one witness.

Gray has named Wanda R. Tucker, one of the subordinate judges and a signer of the letter criticizing Walker, as acting chief administrative law judge. Her permanent appointment is under consideration by the D.C. Council.

Pedro Ribeiro, a spokesman for Gray, said the mayor has no intention of revisiting his decision to fire Walker. “Anyone who admits four ethics violations and pays a $20,000 fine, people can make up their own minds whether they’re fit for that office,” he said.