The turmoil at the National Rifle Association reached a new level on Wednesday with the resignation of Chris Cox, the gun group’s top lobbyist who was once considered the heir apparent to longtime organization leader Wayne LaPierre.

News of Cox’s resignation, which was first reported by The New York Times, came less than 12 hours after the NRA announced it was dissolving its business partnership with Ackerman McQueen, its longtime marketing and public relations firm, the culmination of a monthslong back-and-forth legal battle. The news marks a stunning turnaround in the relationship of the two entities, which had become so intertwined it was difficult to see where one ended and one began, as an April investigation by The Trace and The New Yorker demonstrated.

Cox’s departure is likely to have an immediate impact on the NRA’s political and legislative clout. He began his NRA career in 1995 and, since 2002, he has served as executive director of the organization’s Institute for Legislative Action, its highly influential lobbying arm. Cox has long been a well-connected and prominent political operator on Capitol Hill.

While his resignation is likely to send shockwaves through the organization’s membership, the news didn’t come out of the blue. On June 20, Cox was placed on administrative leave in light of allegations contained in an NRA lawsuit that he had conspired with Oliver North, the group’s former president, in an April power struggle against LaPierre.

“The allegations against me are offensive and patently false,” Cox said in a statement issued after his suspension. “For over 24 years I have been a loyal and effective leader in this organization. My efforts have always been focused on serving the members of the National Rifle Association, and I will continue to focus all of my energy on carrying out our core mission of defending the Second Amendment.”

LaPierre accepted Cox’s resignation in a Wednesday statement, thanking him “for his service to the NRA and for his efforts to advocate for the Second Amendment.”

On the eve of the NRA’s convention in April, LaPierre alleged that North had tried to pressure him to resign by threatening to release a document detailing new financial and harassment allegations. North resigned within days, but the NRA leader said those allegations came at the behest of Ackerman, and the NRA and its longtime PR firm have been locked in an acrimonious battle ever since.

First, the NRA sued Ackerman in April for deceptive billing practices and refusing to open up its books. Then, it sued the Oklahoma-based firm for a second time in May, accusing Ackerman of targeted leaks to the media that were part of a broader “coup” attempt.

Ackerman launched its own countersuit last month. After first accusing the NRA of trying to get out of paying Ackerman “a very substantial amount of money,” the firm followed up last week with a June 19 court filing saying that the gun group owed it nearly $1.7 million. The firm, which produced NRATV, said it would shut down the network and stop other services unless the NRA posted a $3 million letter of credit.

On Tuesday night, the NRA gave Ackerman notice that it was formally dissolving its business relationship. LaPierre followed that up with a public statement to NRA members on Wednesday, emphasizing that the organization’s decision to shutter live TV programming came after “evaluating if our investment in NRATV is generating the benefits needed.” He added, “What necessitated the change now is our conclusion that our longtime advertising firm and website vendor failed to deliver upon many contractual obligations it made to our Association.”

The NRA’s decision to end its relationship with Ackerman effectively ends employment for prominent NRA spokespeople like Dana Loesch and Colion North. Both personalities drew exorbitant salaries from Ackerman (as had former NRA president North).

And the financial relationship between the two has been extensive. The NRA paid Ackerman more than $40 million that year, according to 2017 tax filings. It also billed Ackerman extensively, including for hundreds of thousands of dollars in travel and clothing expenses for LaPierre alone.

The NRA may still be on the hook for further compensation. During a hearing in Alexandria Circuit Court concerning Ackerman’s suit on Wednesday, a judge declined to order the organization to immediately pay Ackerman the $3 million it said it was owed, according to journalist Stephen Gutowski, who attended the hearing. But he said the judge scheduled a follow up court date, leaving open the possibility that the NRA could still be forced to pay.