A war of words broke out Tuesday among former senior Justice Department officials over Pennsylvania politics and the aftermath of the 2020 election, fueled by former president Donald Trump’s release of a letter by a former appointee who is seeking Trump’s backing as he considers a run for governor.

The debate about how Trump’s Justice Department did or did not pursue allegations of election fraud last year has been a divisive issue in Republican primaries, with some candidates and prospective candidates embracing Trump’s unfounded claims.

In Pennsylvania, a hotly contested battleground state where Trump’s allies sought to reverse Joe Biden’s 2020 presidential victory, the latest dispute is between former attorney general William P. Barr and William McSwain, a former U.S. attorney for Philadelphia.

McSwain is one of a number of Pennsylvania Republicans interested in running for governor in 2022 who have been vying for Trump’s endorsement. Others include former congressman Lou Barletta, a longtime Trump ally who was one of the first Pennsylvania Republicans to endorse Trump in 2016, and state Sen. Doug Mastriano, a leading proponent of Pennsylvania’s “Stop the Steal” movement.

In a June 9 letter to Trump made public Monday night, McSwain said his office “received various allegations of voter fraud and election irregularities.” The letter seemed to blame Barr for not allowing McSwain to fully pursue and publicize them.

“As part of my responsibilities as U.S. Attorney, I wanted to be transparent with the public and, of course, investigate fully any allegations,” McSwain wrote. “Attorney General Barr, however, instructed me not to make any public statements or put out any press releases regarding possible election irregularities. I was also given a directive to pass along serious allegations to the State Attorney General for investigation — the same State Attorney General who had already declared that you could not win.”

In an interview, Barr disputed McSwain’s characterizations of his actions and said McSwain told him he wrote the letter in a bid to win Trump’s endorsement — or at least stave off attacks.

“Any suggestion that McSwain was told to stand down from investigating allegations of election fraud is false. It’s just false,” Barr said, adding that the assertions “appeared to have been made to mollify President Trump to gain his support for McSwain’s planned run for governor.”

Barr said he called McSwain on Monday to complain about the letter, which he heard about before it became public. McSwain defended his missive as technically accurate while asserting, “I can’t have Trump attacking me,” Barr said. McSwain, he added, told him that “he was in a tough spot because he wanted to run and he needed Trump’s at least neutrality, if not support.”

McSwain disputed Barr’s description of their discussion, saying in an interview that his motive for writing the letter “is that I believe in transparency. The more people who know the facts, the better.”

Barr’s conduct in the election season and its aftermath has been the subject of intense debate and criticism. Before the election, he cast doubt about the integrity of mail-in ballots at a time of their unprecedented use during a pandemic; afterward, he gave federal prosecutors unusual leeway to pursue allegations of “vote tabulation irregularities” before results were certified.

In September, the Justice Department announced an investigation of fewer than a dozen discarded ballots in central Pennsylvania, which Trump used to tout his unfounded claims of election rigging. That case fell apart after it was hailed by Trump and others; the matter was closed in January, after investigators found insufficient evidence of criminal intent.

A former Justice Department official, speaking on the condition of anonymity to discuss sensitive law enforcement matters, said McSwain had wanted to hold a news conference after Election Day decrying broad “irregularities.” Justice Department officials, including Barr, were opposed, saying it was the agency’s role to investigate allegations of fraud, not double check how elections are administered.

Barr did authorize investigators in various spots across the country to pursue allegations of fraud, and he personally read FBI interview transcripts, the former Justice Department official said. But he declared publicly in December that investigators did not find evidence to back Trump’s fraud claims.

Barr said McSwain told him in their phone call that his reference to a “directive” involved a single matter having to do with “allegations of irregularities” in Delaware County, Pa., and that the directive came in a conversation with Richard Donoghue, a senior Justice Department official.

“Donoghue never suggested to McSwain he stand down from any investigation into fraud,” Barr countered

In a text message, Donoghue backed Barr’s version of events. “While I was made aware of allegations relating to conduct in Delaware County, I did not preclude DOJ personnel in Pennsylvania from investigating allegations of criminal misconduct relating to the 2020 elections or direct that any such allegations be handled exclusively by state authorities,” he wrote.

“Allegations of election fraud were handled by both federal and state authorities throughout the 2020 election cycle,” Donoghue said. “Which authority or authorities reviewed a particular allegation turned largely on the nature of the allegation itself.”

McSwain said Tuesday that Barr told him “directly on the phone” not to speak publicly about possible election irregularities. He stood by his assertion that Barr and his staff told him to pass along voter-fraud allegations to the state attorney general’s office.

“If Attorney General Barr is claiming that I was not told to make referrals to the state attorney general’s office, I assume he is simply not remembering what happened or that he wasn’t always involved in the details,” McSwain said. “As a prosecutor, all I wanted was the freedom to follow the evidence where it leads.”

Among other GOP gubernatorial hopefuls in Pennsylvania, Mastriano, in particular, has embraced Trump’s election-fraud claims. He toured the Republican-commissioned ballot review underway in Arizona and attended rallies in Washington on Jan. 6, although he has said he did not enter the U.S. Capitol building. Mastriano also met with Trump in New York City in May and afterward suggested that he had secured the former president’s endorsement for governor, prompting denials from Trump’s team, which said he has not made an endorsement in the race.

Mastriano is spearheading the latest push for an audit of the 2020 election results in Pennsylvania. Last week, he asked Philadelphia and the Republican-leaning counties of York and Tioga to turn over to the legislature a long list of voting-related items, including voting machines, tabulators and ballots.

Citing his role as the chairman of the state Senate Intergovernmental Operations Committee, he told the counties that if they did not provide a plan to comply with his request by July 31, subpoenas could be forthcoming.

“I believe the only way to restore confidence in our Commonwealth’s election process is to undertake a forensic investigation of the election results,” he wrote.

None of the jurisdictions have responded, although city commissioners in Philadelphia said in a statement that Mastriano’s letter “reiterates claims about the November 2020 election that have been resoundingly rejected by courts.”

Pennsylvania Attorney General Josh Shapiro (D) — who is considering his own run for governor — urged the jurisdictions not to comply with Mastriano’s request, as did the Pennsylvania Department of State.

On Twitter, Shapiro raised the specter of a court challenge should Mastriano pursue subpoenas, writing that his office will “do everything to protect the Commonwealth, its voters and the free, fair election that was held in Pennsylvania.”

The Department of State warned that turning over voting equipment for a third-party forensic review would probably compromise its security and that any county that does so should expect to be required to replace the machines. In Arizona, Maricopa County has said that it no longer trusts voting equipment that was turned over to private contractors hired by the GOP-led state Senate and plans to pay for new machines.

Mastriano’s push has nevertheless been eagerly embraced by Trump and his allies. In a statement Tuesday, Trump claimed that the Pennsylvania Senate was “in the process” of conducting the audit and called on President Biden, who visited the state Tuesday to discuss voting rights, to endorse it.

“Let the Forensic Audit go, Joe. Don’t fight it. Show them how honest it was,” Trump said in a statement.