With just days to go before his criminal trial was set to begin, Division of Ports and Harbors Director Geno Marconi reached a plea deal with prosecutors that will keep him out of jail — but cost him his state job.

His wife, however, remains on the bench.

Late Thursday afternoon, Marconi filed a notice of intent to plead guilty to a Class A misdemeanor for violating the state’s Driver Privacy Act. His trial was scheduled to start Monday on felony charges of witness tampering and falsifying physical evidence, along with two misdemeanor counts of violating the Driver Privacy Act and obstructing government administration. All remaining charges will be dropped under the agreement.

Under the plea deal, Marconi will serve 30 days in jail, but the sentence is suspended for one year contingent on good behavior. He must also pay a $2,000 fine and — most significantly — resign as ports director.

The Pease Development Authority previously claimed Marconi was already retired. But the 73-year-old disputed that assertion and held onto the post despite being suspended pending trial.

The hearing for the plea and sentencing is scheduled for 10 a.m. Friday morning.

Marconi has a history of controversial and sometimes offensive behavior. Still, he has allies who insist he’s the target of what they call “New Hampshire lawfare.”

“Geno has been harassed by the Attorney General’s Office for doing his job,” state Rep. Jack Flanagan (R-Brookline) told NHJournal after news of the plea deal broke. “He’s followed processes that have been in place for more than 23 years of service to New Hampshire. The AG has manipulated state law versus federal law on sharing driver’s license information — even when it was with the commission he reports to.”

The notice of intent to plead includes a telling line: “Def. shall resign as DPH Director prior to plea.” Legal and political observers who spoke to NHJournal on background say that phrasing was intentional.

“I think [Attorney General John] Formella is still in shock that Bobbi is still on the bench,” one legal insider said.

“Bobbi” is State Supreme Court Justice Barbara Hantz Marconi, Geno Marconi’s wife, whose own misconduct added to the state’s Marconi mess. She, too, faced multiple charges and, like Geno, struck a plea deal resulting in a single misdemeanor conviction.

The situation took a remarkable turn when, despite pleading no contest to abuse of office, Justice Hantz Marconi returned to the state’s highest court just one week later — a move made possible by the lenient terms of her deal with Formella’s office.

As a result, cases before the state’s highest court will be heard by a judge who is also a convicted criminal.

In Geno Marconi’s case, prosecutors allege he improperly accessed the vehicle registration information of Pease Development Authority Vice Chair Neil Levesque and shared it with Bradley Cook, the former chair of a harbor advisory committee.

The state contends Marconi was angered by Levesque, who had raised complaints about Marconi’s management of Rye Harbor. It remains unclear what, if anything, Marconi and Cook intended to do with the information, which Levesque had submitted as part of a pier permit application.

Cook is scheduled to stand trial on related charges early next year.

Legal and political observers are questioning how both Marconis managed to secure what appear to be lenient plea agreements. Many believe the answer lies in Formella’s reluctance to testify.

Marconi’s defense sought to compel Formella to take the stand. But that request was denied last week. However, Rockingham Superior Court Judge David Ruoff ruled that Marconi’s team could place Formella under oath if testimony at trial “opened the door.”

Marconi claims Formella initiated the investigation against him while serving as Gov. Chris Sununu’s legal counsel, and that he continued to pursue it after becoming attorney general.

Before her plea deal, Justice Hantz Marconi’s legal team had also sought to compel Formella’s testimony. Court filings show he was the original and sole investigator searching for evidence that she had attempted to pressure Sununu to intervene in her husband’s case — an allegation Sununu himself denied, according to court records.

The plea agreements mean both Marconis will avoid jail time and emerge with misdemeanor convictions. They also ensure that Formella will not be required to testify — at least for now.