(Updated 6:50 p.m.) A bitter, nearly two-year fight between state election regulators and the Connecticut Democratic Party regarding mailers the party sent out in 2014 promoting Gov. Dannel P. Malloy’s re-election campaign came to an end Wednesday.

The State Elections Enforcement Commission voted 2-1 with one abstention to settle two lawsuits with the Connecticut Democratic Party. Michael J. Ajello, who was appointed by former Senate Minority Leader John McKinney, was the only member of the five member board to vote against the settlement.

As part of the settlement agreement, which was filed in court late Wednesday afternoon, the Connecticut Democratic Party will give $325,000 to the state. The payment is not considered a penalty or a fee, but it’s the largest amount election regulators have ever received.

The State Elections Enforcement Commission had sought to enforce a subpoena to obtain information about how the party paid for the mailers. Since Malloy was a clean election candidate he was prohibited from accepting any help from state contractors. However, the party’s federal campaign account that was used to pay for the mailings is allowed to accept contributions from state contractors.

The SEEC subpoena sought financial documents and records of correspondence between top state and party officials regarding the October 2014 mailings.

According to the settlement agreement, in addition to paying $325,000 to the state by Sept. 30, 2018 the party has agreed that in the future mailings or media on behalf of state candidates should be made with the state-only account or a separate “compliant account,” which falls under the jurisdiction of both the SEEC and the Federal Elections Commission.

All spending by the party during federal elections that is on behalf of Connecticut candidates must come from this “complaint account,” according to the agreement.

The solution, according to State Elections Enforcement Executive Director Michael Brandi, “closes a potential loophole” in the law that would have allowed state contractors to find a way to influence state candidates.

“We’ve done something innovative by creating a structure by which the state party—any state party—can fully abide by both federal and state law,” Brandi said. “Importantly, the argument about federal pre-emption of state law is off the table.”

The settlement also gives the SEEC the ability to inquire or investigate the distribution of allocations made by a federal account on behalf of state candidates and it prohibits anyone involved as an officer with the Malloy 2014 campaign or the Democratic Party from being eligible to serve as a campaign treasurer until at least eight payments or $293,900 has been paid by the party.

Brandi said after Wednesday’s vote that the settlement will set forth a “clear road map for how they will conduct themselves in the future.”

Brandi said they are trying to move forward with a “stronger Citizens Election Program” and to preserve “the authority of the State Elections Enforcement Commission to enforce the laws in Connecticut.”

He said the dollar amount of the settlement is related to the conduct that they felt that was “egregious.”

He said the settlement is talked about a “voluntary payment” in the agreement, but the commission is charged with issuing fines and penalties for violations of campaign laws.

“This is a significant penalty probably in the range of multiple times what the commission has ever issued in the past,” Brandi said. “And we believe it’s an appropriate amount here to act as a deterrent to conduct like this.”

Superior Court Judge Antonio Robaina, who presided over the trial, will still have to approve the settlement.

The settlement means though that no one will ever know whether the Connecticut Democratic Party violated Connecticut’s clean election law.

Details of the settlement were panned by the Republican Party, which initially filed the complaint with the SEEC.

“The Connecticut Democratic Party has effectively gotten away with illegal campaign spending on behalf of Governor Dan Malloy, and made a mockery of clean campaign laws,” Republican Party Chairman JR Romano said. “They allowed backdoor donations from state contractors to flow into the Malloy re-election campaign, in direct violation of these laws.”

He said that “by allowing the Connecticut Democrats to get away with these violations, the SEEC has missed the chance to set a precedent declaring that illegal campaign spending will not be tolerated in our state. This settlement weakens and waters down enforcement of clean campaign laws, by pretending that the Democrats did nothing wrong. It is outrageous and flippant disregard for fair elections.”

Senate Minority Leader Len Fasano, R-North Haven, had even harsher words for state election regulators.

“Today the SEEC is disregarding their responsibility and moral obligation to protect taxpayers from special interest money creeping its way into elections. They have put a price tag on bending our clean election laws,” Fasano said.

House Minority Leader Themis Klarides, R-Derby, said Malloy and the Democrats “concocted a scheme to violate the spirit and letter of the state’s campaign finance laws that they pushed so hard to put in place, and they thought they could get away with. So what if they got caught, they said, at worst they would have to pay a fine after the election.”

The Connecticut Democratic Party said it’s happy to put the matter behind them.

“The voluntary agreement we have entered into will clarify a fundamental legal question that we raised and pursued in order to resolve a conflicting intersection between state and federal law, and it will help ensure the continued viability of the Citizens’ Election Program going forward,” Michael Mandell, executive director of the Connecticut Democratic Party, said.