The National Rifle Association and its longtime insurance business partner are settling a rancorous months-long legal dispute over the fate of the troubled Carry Guard self-defense insurance program, court records show.

The NRA and insurance broker Lockton Affinity filed a joint motion on November 15 asking a federal judge in the Eastern District of Virginia to dismiss a breach-of-contract lawsuit and countersuit, which the judge accepted the next day.

The terms of the settlement are not public. In an emailed statement, the NRA said it and Lockton had filed for dismissal of the suit “while they use their best efforts to prepare a definitive settlement agreement.”

The NRA sued Lockton in May after the company cut ties with the gun group at the behest of New York State financial regulators. Lockton entered into a consent agreement with New York that required the company not to conduct any more business with the NRA.

The company had worked with the NRA for years to offer its members a variety of insurance products, like coverage for shooting instructors and gun dealers. According to court documents, Lockton helped the NRA conceive of and launch Carry Guard, which covers attorney fees and civil liability for gun owners who shoot someone in self-defense.

Regulators said that Carry Guard broke state law. Among its violations: The program insured the commission of what might potentially be a violent crime, and was marketed by the NRA itself, despite the fact that the group is not a licensed insurance broker.

In its lawsuit against Lockton, the NRA alleged that the company had failed to perform due diligence when developing and launching Carry Guard and failing to protect the product from regulatory scrutiny. The NRA also claimed that Lockton breached its contract when it entered into the consent agreement, and put the gun group in dire financial straits as it lost income and could not renew its own basic liability coverage.

In a countersuit, Lockton said the NRA provoked the crackdown by regulators in New York and other states with provocative political rhetoric, which had escalated in the years since the company first started marketing products to NRA members.

As the dispute has unfolded in the courts, the NRA has been forced to adjust to a new financial reality marked by the loss of insurance partnerships and falling membership dues. Meanwhile, The Trace reported that the gun group’s court battles have preoccupied the NRA’s leadership, and the legal costs have started to cut into basics like office coffee for staffers.