Reams and commissioners reached a settlement agreement that called for his resignation effective Tuesday.

"The office has been in a state of flux since November and his coming back has not done anything to help that," County Commissioner Kevin Coyle said. "The atmosphere is very tense in that office and we didn't anticipate it getting any better."

Reams will be paid about $42,000 to cover his salary through the rest of his term, which ends at the end of the year.

In an interview Tuesday night, Reams described his departure as an early "retirement" and not a "resignation."

He said commissioners approached his lawyer last week and proposed settling the case.

In his letter of resignation addressed to Rep. Norman Major, county delegation chairman, and state Rep. Gene Charron, Reams said he had appointed Senior Assistant County Attorney Patricia Conway as acting deputy county attorney. He said she is "the most qualified, has the longest tenure and experience of anyone in the office."

Reams said Conway would remain in charge until the county delegation takes action on a replacement or voters elect a new county attorney.

Conway is also a Republican candidate seeking to replace Reams.

"It has been my honor to serve as Rockingham County attorney for the last 16 years and I appreciate the support that the delegation has extended to me over that time. It has helped considerably," Reams said in his letter.

Reams has been the target of an investigation by the state attorney general's office into complaints of ethics violations, financial mismanagement and gender discrimination in the county attorney's office.

Attorney General Joseph Foster filed a petition to permanently remove Reams from office and stripped him of his prosecutorial powers in November when he was suspended. A Merrimack Superior Court judge later ordered that Reams be allowed to return to work despite the ongoing effort to remove him. Reams eventually had his prosecutorial powers restored and he returned to work in early May after a five-month suspension.

His case was still pending and was set to go trial Aug. 4.

Reams said he decided to "retire earlier than planned" because he believed the August trial would likely have been postponed for several reasons, including delays in getting discovery information from the attorney general's office and county commissioners.

"It was pretty clear we were never going to get a hearing in the court system before the end of my term and they made me an offer that made economic sense. I agreed to retire earlier than I had planned since they made it worth my while," Reams said.

Reams insisted that his decision to leave does not mean he is admitting guilt.

He said a member of the attorney general's office has been in his office most of the time since he returned following his suspension.

"We haven't had any issues. There were no complaints about anything. The office was functioning and I'm sure it will continue to function as it has," he said.

In a joint statement, county commissioners said Reams agreed to resign in advance of the superior court trial.

"Mr. Reams will immediately resign and receive an amount equal to his appropriated salary for the remainder of his term. The settlement ends the prospect of a long, public trial into allegations that Mr. Reams mistreated female employees throughout his terms of office, improperly used unappropriated forfeiture funds, and engaged in significant ethical lapses in connection with his criminal prosecutorial functions," the statement said.

In a prepared statement, Foster commended the women who "bravely came forward" with complaints of discrimination.

"They were steadfast throughout the course of this investigation and months of litigation. These women helped send an important message: Conduct of this type cannot and will not be tolerated in the workplace," Foster said, adding that filing a petition to remove Reams "was not an easy one and a decision I did not come to lightly. However, given the investigative findings and the power a county attorney holds, I determined that pursuing removal was warranted to protect the fair administration of justice."

Following the investigation, the attorney general's office found Reams failed to comply with his legal and ethical obligations to disclose potentially exculpatory evidence to defense counsel in connection with a criminal prosecution, mismanaged fines due the county and made material misrepresentations to the county commissioners when the mismanagement was discovered.

Reams has previously called the allegations against him "at best, misplaced and exaggerated, and at worst, false."

Reams was first elected county attorney in 1998 and decided against a re-election bid; his term ends in January.

Reams' former deputy, Tom Reid, and county victim advocate Tara Longo also both resigned during the investigation.

Coyle said commissioners believe the settlement is in the best interest of the county and the employees in the county attorney's office. "At the end of the day, it was, in my opinion, in the best interest of the county and county attorney's office that he be gone," Coyle said.

He said the county delegation of state representatives will now have to meet to decide whether to fill the position on their own — a process that could take several months.

If they decide not to find someone, Coyle said, the attorney general's office or county commissioners could find a replacement who would then be approved by a superior court judge. Coyle said the attorney general's office has already agreed to provide an attorney at no cost through the remainder of Reams' term.