After months of fighting between moderates and conservatives, the Utah Republican Party reached a deal Thursday that allows continuing its lawsuit challenging a new state election law — with a businessman paying all its past and future legal costs.

Party Chairman Rob Anderson announced a written agreement with Dave Bateman, chairman of the Entrata property management software company, “to extinguish all legal debt incurred by the party” in the lawsuit.

Anderson said attorneys have billed the party $410,000 so far. He said the party’s Constitutional Defense Committee will continue negotiations seeking to reduce that amount, and Bateman agreed to service the resulting debt.

Anderson had earlier rejected a somewhat similar offer by Bateman because the businessman proposed also to take control of the lawsuit and whether to continue it.

The party chairman said under the agreement now, “It’s still the party’s lawsuit. It’s still under the control of the [Republican] state central committee,” which will decide whether to proceed with any further appeals.

Its current appeal has been argued before the 10th Circuit Court of Appeals, and parties are awaiting a decision. If the court rules against the party, the next appeal would go to the U.S. Supreme Court.

Anderson last year attempted to drop the lawsuit, arguing he had unilateral authority to do so as part of his responsibility to keep the party debt-free, which upset the party’s right wing. But he said he’s happy to let the central committee make decisions on continuing the lawsuit now “without the worries about the budget.”

The party has challenged SB54, a law that allows candidates to qualify for primary elections either by gathering signatures or through the caucus-convention system.

The GOP right wing hates the new law, arguing it devalues the role of party delegates and interferes with the ability of the party to control how it chooses nominees. Conservatives dominate the central committee, which has pushed the lawsuit.

But moderates contend delegates tend to be extreme and choose nominees outside the political mainstream — as shown when ultraconservative Chris Herrod was nominated by delegates in last year’s 3rd Congressional District special election, but was easily defeated by Provo Mayor John Curtis, who qualified for the primary by gathering signatures.

Anderson, elected as chairman last year long after party lawsuits were filed, said the party sank into debt as many moderate business leaders stopped donating for fear their money would go to the legal challenge of a law they support.

Since Anderson became chairman, he said the party has worked hard to eliminate about $150,000 in other non-lawsuit debt — but still has about $50,000 remaining, but is on track to retire that within a few months.

Before he became chairman, Anderson said, many members simply assumed that attorneys would write off their bill for their legal work — but he argued instead that the debt threatened to bankrupt the party.

“That’s a Republican principle — paying our debts and paying as we go, and I think we’re finally able to meet those goals. I’m happy we’re going down that path,” he said. “I’m thrilled to have that monkey off my back.”

Anderson added that he just had a conversation with one of the party’s attorneys, “and he was thrilled. I told him that before I showed up, ‘you were never going to be paid, you know that.’ He said, ‘I know.’”

Anderson said he always promised donors that their money would not go to the controversial lawsuit, but adds that the new agreement should create more confidence and hopefully attract back some donors lost in the controversy.

“This absolves me of any responsibility to take any monies and use those to pay any litigation expenses,” he said. “I’m working on relationships and getting people back to the party, and forging new relationships as well.”