Corey Lewandowski, President Donald Trump’s informal adviser and fired campaign chief, quietly facilitated a highly lucrative deal between Poland’s top military contractors and one of the most elite lobbying shops in Washington, D.C., The Daily Beast has learned.

In the process, Lewandowski managed to spurn socialite Jill Kelley, a one-time associate of the U.S.’ top military official and a central figure in the 2012 sex scandal that brought down retired general David Petraeus.

The story, which was relayed to The Daily Beast by four sources familiar with the developments, is a strange chapter in the former Trump campaign manager’s career—a career that now finds Lewandowski consorting with a hub of lobbyists at the periphery of President Trump’s political circle—including some who work out of his Washington, D.C., home. It’s also a cartoonishly Washington tale, involving backstabbing in the city’s notorious influence industry, a glamorous socialite who was at the center of a historic sex scandal, and political operatives who arrived in D.C. pledging to drain the swamp, only to end up pocketing large sums in exchange for brokering multibillion-dollar weapons deals.

Lewandowski did not directly respond to multiple requests for comment. However, on Thursday morning, his attorney Peter Chavkin conveyed to The Daily Beast a message from his client.

“Mr. Lewandowski never met with or spoke to anyone” who worked at the defense contractor at the center of his dust-up with Kelley, Lewandowski stated, in the third person. Lewandowski, conspicuously, would not answer additional questions regarding any other Polish contacts that he may have had in pursuit of the lobbying deal.

The origins of the lobbying deal began in 2017, as Poland warily eyed increased Russian aggression in Eastern Europe and began looking to secure U.S.-made missiles for its domestic air defense systems. The Polish government and its state-owned arms contractor, Polska Grupa Zbrojeniowa (PGZ), sought assistance in Washington pertaining to Poland’s Wisla and Homar missile defense programs. Known in English as the Polish Armaments Group, PGZ is a conglomerate of 60 Polish defense companies.

In the spring of 2017, Kelley began telling associates that she would leverage a contact at the Polish Embassy to secure a lucrative business deal with the country’s government.

Kelley enjoys strong, and well-documented, contacts in the U.S. defense community. Her relationships played heavily into her role in the scandal that brought down Petraeus and embroiled high-level military officials in tabloid intrigue involving the retired general’s one-time mistress, Paula Broadwell. Kelley also has served as a ceremonial diplomatic liaison to James Mattis, a retired Marine Corps general and currently the secretary of defense, which would have made her an appealing voice in Washington for Poland’s arms industry.

PGZ did not respond to questions about Kelley and its broader D.C. lobbying footprint. But according to two sources familiar with Kelley’s conversations with associates, she said one of her contacts worked as a military attaché in Poland’s embassy in Washington.

“Jill Kelley is someone who has served her country in a number of capacities… [and] she has gained a number of very high-level contacts [with whom] she in the last year has chosen to begin discussions through her firm,” Brett Bruen, her representative, told The Daily Beast. “And while her work is still very much in the early stages, I think it is clear there are a number of very senior folks who seek her counsel and who are interested in her support. I will say to date she has not engaged in any paid work on behalf of a sovereign nation. She has done what she has done for many years, which is connect people.”

It’s not entirely clear why Kelley turned to Lewandowski for help on the matter. Though part of the reason, a source with direct knowledge says, is that Lewandowski was one of the marquee names within the Trump orbit—a world in which few of the more established D.C. power brokers enjoyed strong inroads.

When Kelley and Lewandowski first began discussing the deal, it was months into the Trump presidency. Lewandowski had already carved out a niche for himself as someone with personal access to the president for potential clients of Avenue Strategies, the lobbying firm he unveiled days after Trump’s inauguration. Four months after starting that firm, he resigned from it, reportedly over differences with his co-founder, fellow former Trump campaign hand Barry Bennett. He went on to start his own firm, Lewandowski Strategic Advisors, which provides political intelligence but does not officially lobby policymakers on behalf of its clients.

Kelley began telling associates in Washington last year that she had introduced Lewandowski to her Polish contacts and that they would be collaborating on a big initiative, according to multiple sources familiar with the situation.

Lewandowski apparently had other plans.

He had already been in touch with another D.C. lobbying giant regarding one of its foreign government clients. In a July 2017 email to Lewandowski, reviewed by The Daily Beast, Ed Rogers, the veteran Republican operative and chairman of the firm BGR Group, inquired about Lewandowski’s contacts with the Azerbaijani ambassador to the U.S., whom BGR had represented since March. “Corey, we’re [ sic ] you able to talk to the Azerbaijan ambassador?” Rogers asked. “Call and let’s catch up for 15 minutes.” Politico later reported that Lewandowski had promised the ambassador, Elin Suleymanov, a personal sit-down with Trump. At the time, Lewandowski denied doing any “foreign work.”

The relationship between Rogers and Lewandowski didn’t end with Azerbaijan. According to sources familiar with their interactions, the two grew closer as the Trump presidency progressed, and talked about potential collaborations.

But by the end of 2017, Kelley had been cut out of the PGZ deal. As she waited to hear from Lewandowski on their plans for Poland, she was taken aback when she started hearing through professional cliques and general gossip that BGR, which previously represented the Polish Embassy in Washington, had swooped in on the deal. It inked a $70,000-per-month contract with PGZ on Oct. 25 (PDF), weeks before Kelley hosted a party at the Trump Hotel in Washington. Kelley and her co-host had listed Lewandowski as a likely attendee on invitations for that party. It’s not clear whether Kelley knew at the time that she had lost out on a major business opportunity thanks to the former Trump campaign manager. BGR’s contract with the company first popped up on the Justice Department’s registry of foreign agents less than two weeks after Kelley’s party.

Once enthused at the prospect of working with Lewandowski, Kelley was cut out of a big-money foreign lobbying deal in which she had initially enlisted Lewandowski’s assistance. As one source familiar with the situation bluntly characterized it, Lewandowski “fucked over” Kelley in the deal. Three knowledgeable sources said that Lewandowski was instrumental in PGZ’s decision to sign with BGR instead of working with Kelley.

Rogers did not respond to messages from The Daily Beast on Thursday as of press time. But the extent of his ties to Lewandowski were underscored by the email he sent, on which he CC’d another Trump campaign alumnus, Mike Rubino, a former lobbyist at Avenue who left to start the firm Turnberry Solutions, which lists as its address the Capitol Hill house that Lewandowski rents from the conservative nonprofit group Citizens United.

Less than two months after BGR landed PGZ as a client, the firm signed a subcontractor on the account: Jason Osborne, a former Avenue lobbyist and, along with Rubino, a co-founder of Turnberry (PDF). Two weeks later, Osborne also registered to lobby for the Azerbaijani Embassy on BGR’s behalf (PDF).

Osborne is another former senior Trump campaign adviser who remains close to Lewandowski and operates out of his rented home. Osborne also did not respond to questions about his role.

BGR spokesman Loren Monroe declined to comment on PGZ work or any collaboration with Lewandowski, saying only that foreign agent paperwork on file with the Department of Justice “speaks for itself.”

According to its PGZ contract, BGR is assisting the company with issues related to its Wisla and Homar missile defense programs. In March, just a few months after it signed the contract, Poland and the U.S. reached a landmark $4.75 billion arms procurement deal to beef up those missile systems. “Polska Grupa Zbrojeniowa,” the company proudly announced, “will carry out many tasks in this project.”

As part of the deal, PGZ will beef up the Wisla system with a pair of Patriot missile batteries purchased from U.S. defense giant Raytheon. As it happens, Raytheon is also a BGR client .