A rival of McKinsey & Co. accused the consulting giant of being a “criminal operation” that ran a 10-year racketeering scheme in order to unfairly win tens of millions of dollars in business.

The civil complaint — filed in federal court on Wednesday by Jay Alix, who founded rival restructuring firm AlixPartners — claims McKinsey illegally concealed that it had conflicts of interest that could have stopped it from advising companies for its lucrative bankruptcy restructuring practice.

The 150-page complaint goes on to allege that McKinsey Chief Executive Dominic Barton had leveraged his consulting business in an illegal “pay-to-play” scheme that rewarded bankruptcy lawyers who steered their clients to the company in exchange for other work.

“It is unusual to find a company with the reputation of McKinsey of engaging in this type of conduct,” said Sean O’Shea, partner at Boies Schiller Flexner, the firm representing Alix.

McKinsey called the suit “baseless” and claimed its restructuring unit, RTS, had done nothing wrong.

“The courts and US trustees have repeatedly dismissed Mr. Alix’s prior challenges, approved RTS’ disclosures, and concluded that RTS has met all of its disclosure requirements,” DJ Carella, a spokesman for McKinsey, told The Post.

The suit comes after a Wall Street Journal article in April detailed that McKinsey disclosed far fewer conflicts than in the average court-supervised reorganization — and that the conflicts included companies involved in the particular case.

McKinsey failed to disclose pertinent conflicts in bankruptcy cases involving SunEdison, GenOn, Harry & David, and American Airlines, the Journal said.

The suit claims that McKinsey’s sparse disclosures amount to a streak of anti-competitive behavior that rises to the level of racketeering.

“McKinsey’s racketeering activity was calculated to harm [AlixPartners] by depriving it of valuable consultancy assignments,” the suit claims.

“You really need to zoom out to see the picture really clearly, and that’s what the racketeering charge allowed us to do form a legal perspective,” said O’Shea, who said that he’d been working on the suit for months.

In one alleged fraud detailed in the 150-page suit, McKinsey didn’t disclose in 2002 that Boeing was one of its clients during the Chapter 11 reorganization of United Airlines, which Alix claims is illegal. Boeing was also a senior secured creditor of United at the time.

That relationship could have disqualified McKinsey from getting legal approval to do business with United, the suit alleges.

If the Boeing connection had been disclosed, United’s other creditors may have objected to a McKinsey appointment out of concern that Boeing would get preferential treatment.

In another claim, Alix alleges that McKinsey, which often consults with corporate clients on how to best manage their business, dangled lucrative clients before bankruptcy lawyers in order to win restructuring business in return.

Dominic Barton, McKinsey’s CEO, has been aware of his company’s “pay to play” scheme — having admitted as much to Alix in 2014, according to the suit.

“After conducting his own investigation, Barton admitted to Alix that McKinsey was intentionally concealing its clients’ identities and that it was conducting the ‘pay to play’ scheme,” the suit alleges.

A McKinsey spokesman didn’t directly address that allegation in a statement, but had previously told the WSJ that Barton remembers the conversation differently.