Former Attorney General Bill Barr sharply denied Tuesday that he ordered the top federal prosecutor in Philadelphia at the time not to investigate allegations of 2020 election fraud, and said Bill McSwain is only leveling that accusation to curry favor with former President Donald Trump in his run for Pennsylvania governor.

McSwain, the former U.S. Attorney for the Philadelphia region, made the claim in a June letter to Trump, which Trump made public Monday night.

“The letter is written in a very deceptive way that is intended to convey an impression, it’s a false one, that he was restrained from looking into election fraud,” Barr told The Inquirer, adding that he spoke to McSwain about the letter Monday night. “When I called him I said, ‘It was just the opposite. I put in writing to you and the other U.S. attorneys that you had the discretion to look into any specific, credible allegations of major fraud.’”

McSwain wrote in the letter that he received “various allegations” of wrongdoing, but was instructed by Barr “not to make any public statements or put out any press releases regarding possible election irregularities.”

McSwain’s letter cited a “directive” to “pass along serious allegations” to state Attorney General Josh Shapiro. Barr said that order came from one of his top deputies and was an instruction to share information with Shapiro’s team, not a “stand-down” order for McSwain to stop investigating.

But Shapiro’s office said late Monday that McSwain never shared any allegations, and Barr’s denial cast further doubt on McSwain’s account.

Barr said McSwain was more interested in making “political statements” about how the 2020 election was conducted in Pennsylvania than in pursuing actual allegations of fraud.

No credible evidence has surfaced of any significant fraud in Pennsylvania’s election results.

“He wanted to not do the business of the department, which is to investigate cases, but instead go out and flap his gums about what he didn’t like about the election overall,” Barr said.

» READ MORE: Supporting Trump’s election lies is becoming a litmus test for Pennsylvania Republicans seeking higher office

Barr said he confronted McSwain about the letter Monday.

“He told me that he had to do this because he was under pressure from Trump and for him to have a viable candidacy he couldn’t have Trump attacking him,” Barr said of McSwain. He added that McSwain said he needed Trump’s support, or at least for him to stay neutral in the race, so he wrote a letter that “tried to thread the needle” by laying out “things that were technically true” while not giving “support to Trump’s stolen election narrative.”

McSwain, while touting the release of the letter as evidence of his commitment to “transparency,” has not responded to multiple requests for an interview to clarify whether he accepts the 2020 election results or further explain his allegations in the letter. He again refused to go into specifics in an interview Tuesday on Talk Radio 1210-WPHT’s conservative “Dom Giordano Show.”

“We received all kinds of types of allegations,” he said, obliquely referencing only vague allegations around flash drives used in voting machines. But he also appeared to acknowledge that his office did not make much — if any — progress in probing whether there was evidence to support those claims.

“I’m not making any judgments about what I would or would not have found,” he said. “But what I didn’t like was that I wasn’t free to follow the evidence wherever it leads.”

After Barr disputed his characterization, McSwain told The Washington Post that he’s sticking to his story.

Asked if he think Trump’s interest in McSwain’s letter is about re-litigating the 2020 election or attacking Barr for disputing Trump’s fraud claims, Barr said, “it could be a little of both.”

”From the very beginning,” Barr said, “my position on this has been that we have not yet seen any evidence of broad scale fraud that would have affected the outcome.”

-Staff writers Jeremy Roebuck and Jonathan Tamari contributed to this article.