A former member of Congress who pushed for political changes in Ukraine that aligned with Rudy Giuliani’s investigative efforts there got millions of dollars in political support from a pro-Trump super PAC financed in part by Giuliani allies.

The more than $3 million that the group, America First Action, spent supporting former Rep. Pete Sessions (R-TX) included huge ad buys that appear to have pushed the boundaries of laws restricting super PAC coordination with political campaigns, according to a Daily Beast review of federal campaign finance and television broadcasting records. And they could severely complicate the former congressman’s attempt to win back office in 2020.

The expenditures made by America First Action came during the 2018 election cycle, during which Sessions was fighting desperately to hold on to his House seat in a race he would go on to lose to Democrat Colin Allred. The PAC, which has President Donald Trump’s official imprimatur, has raised millions of dollars to fulfill that task. And during that election season, $325,000 of that came from a company called Global Energy Producers LLC, a firm run by Lev Parnas and Igor Fruman.

The Soviet-born businessmen were, at the time of their donation to the PAC, helping Giuliani solicit dirt on President Donald Trump’s political opponents from officials in Ukraine. That work, which is now at the center of an impeachment inquiry against the president, included trying to get the U.S. ambassador to Ukraine, Marie Yovanovitch, removed from her post on grounds that she was badmouthing Trump.

Trump allies have also alleged that Yovanovitch was blocking key corruption investigations in the country—most importantly, for their purposes, a probe into the Ukrainian business activities of Hunter Biden, the youngest son of Democratic presidential candidate and former Vice President Joe Biden. According to the Associated Press, the Giuliani clique continually pressed for Yovanovitch’s removal early this year. She was recalled from her post in May.

Sessions’ role in the saga began in the spring of 2018. On May 9, Parnas posted photos to Facebook showing him and a business associate, David Correia, posing with the then-congressman in the Capitol complex. Two days later, Sessions shot off a letter to Secretary of State Mike Pompeo questioning the fitness of Yovanovitch.

“I have received notice from close companions that Ambassador Yovanovitch has spoken privately and repeatedly about her disdain for the current administration,” he wrote in claims that mirrored allegations from Giuliani and his associates.

Six days after the letter was sent, Global Energy Producers made its donation to America First. The following month, Parnas and Fruman each donated the legal maximum to Sessions’ campaign.

Sessions’ campaign did not respond to a request for comment on this story. But the former congressman has denied that he pressed for Yovanovitch’s removal at the behest of Giuliani, Parnas, or anyone else.

“I do know both these gentlemen,” Sessions told BuzzFeed News and the Overseas Crime and Corruption Reporting Project in response to a joint investigation into Giuliani, Parnas, and Fruman. “They are Republicans. They are people who have an interest in foreign affairs. They have a strong interest in America not backing away from Ukraine.”

America First spokesperson Kelly Sadler said there was no understanding when GEP donated to the group that it would be supporting Sessions’ candidacy, or that the money provided by Parnas and Fruman’s company would go toward a specific candidate.

But as investigations into what Trump and Giuliani were doing in Ukraine continue to ramp up, Sessions’ opponents are demanding that he further explain the reasoning for his letter to Pompeo and whether he was rewarded financially for writing it.

“At the moment, it seems to me he was playing the role of the useful idiot,” his Democratic opponent this time around, businessman Rick Kennedy told The Daily Beast in an email. “Sessions and the incumbent Bill Flores represent everything that is wrong with our politics today. They’re both ordained by big donors to sit in a seat in Congress to represent [the donors’] interests. The donors move candidates around like pieces on a chess board to try to get their representatives in and their agendas through.”

Kennedy said he doesn’t buy Sessions’ insistence that he was not doing Giuliani’s bidding. “He wrote a letter without understanding the broader context or strategy, and he got a couple of big donations for it,” the Democrat said in his email.

Sessions, who was one of the most endangered Republican incumbents during the 2018 cycle, was one of 15 House candidates to benefit from America First’s eight-figure independent expenditure campaign. The group ultimately dropped more than $3.1 million supporting Sessions and attacking Allred, according to Federal Election Commission data. Only one other House candidate got more America First air support last year.

Super PACs are legally prohibited from coordinating with the campaigns of federal political candidates they support. But America First’s extensive television ad buys on Sessions’ behalf appear to have employed a tactic that good government groups say pushes the boundaries of—and could even violate—federal laws barring such coordination.

The tactic revolves around the use of a shared vendor. The Sessions campaign employed an ad-buying firm called America Media & Advocacy Group, while America First used a company called Red Eagle Media Group. Public records indicate that the groups are effectively the same entity, with shared staff and office space.

In fact, the same official, America Media executive Jon Ferrell, signed Federal Communications Commission paperwork for both entities as they took out late-October ad buys in an effort to shore up Sessions’ political prospects. Vendors are legally permitted to work for both a political campaign and a supportive super PAC provided they “firewall” off the services they provide to eac h, and Sadler said that the group had taken pains to establish just such boundaries.

“We have hired political professionals, both in-house and externally, who have worked in this field for years and take these obligations seriously,” she wrote. “Any suggestion otherwise is false and likely politically motivated."

The Campaign Legal Center, a nonprofit campaign finance watchdog, filed an FEC complaint against the National Rifle Association last year under similar circumstances, arguing that the legally required firewall is farcical when the same executive oversees ad buys for both a campaign and an allied super PAC.

“It appears that the coordination scheme pioneered by the NRA has also been adopted by the president’s super PAC,” said Brendan Fischer, CLC’s director of federal and FEC reforms. “The NRA used common vendors to coordinate potentially tens of millions of dollars with the Trump campaign in the 2016 election, and Trump’s super PAC appears to have replicated the scheme in 2018.”

Indeed, even as he was approving America First ad buys supporting Sessions’ candidacy, Ferrell was signing other FCC forms as an “agent for Pete Sessions for Congress.”