The National Rifle Association sued its most prominent contractor on Wednesday, even as the gun group declared that it was “now moving forward” from an ugly power struggle that had consumed its leadership at the highest levels.

In the lawsuit, the group accused Ackerman McQueen, its longtime advertising firm, of breaching its contract by orchestrating a smear campaign against the N.R.A. and its chief executive, Wayne LaPierre. The legal action came about a month after the N.R.A. filed a separate suit against Ackerman, asserting that the company had concealed details about how it spent the roughly $40 million that it and its affiliates receive annually from the association.

The previous suit touched off a power struggle that pitted Oliver L. North, an employee of Ackerman who also served as the N.R.A.’s president, against Mr. LaPierre. The dispute unfolded at the N.R.A.’s annual convention last month in Indianapolis — where President Trump addressed the group — and culminated in the ouster of Mr. North.

The schism has been a shock, given how close the two organizations have been. Ackerman, based in Oklahoma, continues to operate NRATV, the N.R.A.’s hard-edged online streaming service, and has defined the group’s voice, going back to the “I’m the N.R.A.” campaign in the 1980s. Mr. LaPierre’s wife, Susan, once worked for the company, and Tony Makris, Ackerman’s top executive in the Washington area, is a former business associate of Mr. LaPierre’s.