Philadelphia elections officials said Friday they won’t participate in a “forensic investigation” of the 2020 election that’s being spearheaded by a top Trump ally in the Pennsylvania legislature, setting the stage for a potential legal fight.

All three city commissioners, Philadelphia’s board of elections, voted to send a letter to State Sen. Doug Mastriano (R., Franklin) rejecting his demand for essentially all election-related materials.

The letter says the city’s election system is “fair and secure” and warned that Mastriano’s inquiry would cost taxpayers tens of millions of dollars and throw upcoming elections into chaos.

“The board cannot agree to the undertaking of your proposed review of the county’s election equipment,” the letter says.

It continues: “Among other things, there is no claim that Philadelphia County’s election systems or processes were compromised nor is there any basis to jeopardize the constitutionally mandated secrecy of the votes cast by City of Philadelphia residents, to expose the taxpayers of the city to tens of millions of dollars in additional and unanticipated expenses, or to risk the very ability of Philadelphians to cast ballots in future elections if Philadelphia’s system was decertified.”

The letter comes weeks after Mastriano, a likely candidate for governor who has spread former President Donald Trump’s lies about a stolen election, asked Philadelphia and two other counties for a broad range of election equipment and materials as he seeks to launch a review of the 2020 election and 2021 primary.

Tioga and York Counties, both led by Republicans, have also pushed back on Mastriano’s request, raising concerns about costs and the logistics of such an investigation.

Pennsylvania’s acting secretary of state directed counties not to comply, saying that permitting third-party access to election equipment was a security risk and would force the counties to buy new systems.

Mastriano warned at the time that the committee he leads would consider issuing subpoenas for the materials if the counties didn’t comply. He told a central Pennsylvania radio station on Wednesday that he plans to convene a meeting of the Senate Intergovernmental Operations Committee as soon as next week to vote on the subpoenas.

That committee typically doesn’t oversee election issues, which are the purview of a different panel. The Senate also has a special committee this year to examine election issues and make recommendations for legislation.

Omar Sabir, a Philadelphia commissioner, said Friday that Mastriano’s review is designed “to cast doubt on the election” and cause confusion that could “stop voters of color from participating in the process.”

“Philadelphia came out and voted in large numbers in the general election in 2020,” Sabir told reporters, “and some people are still upset about that.”

Lisa Deeley, the Democratic chair of the city commissioners, wrote in the letter that the city has already completed an audit of the 2020 election, as required by law, and also conducted a “risk-limiting” audit, a gold-standard method of checking a random sample of paper ballots.

She noted that multiple courts have “confirmed that there has been no evidence of any election malfeasance.”

What’s more, Mastriano’s pursuit of an Arizona-style “audit” would result in the decertification of Philadelphia’s election equipment and could cost more than $35 million, Deeley said.

Acting Secretary of State Veronica Degraffenreid last week decertified voting machines in Fulton County, in the south-central part of the state, after it allowed a contractor to inspect the equipment. The county will most likely have to buy or lease new machines. That privately funded review was also arranged by Mastriano.

Deeley added that replacing the voting system and equipment “would likely take over a year” to complete and “render it impossible” for Philadelphia to conduct the November election and May 2022 primary election, according to the letter.

Mastriano requested essentially all election-related materials, including ballots, mail ballot applications, mail ballot envelopes, voting machines, vote-counting equipment, and poll books.

He has not explained how his investigation would work, including where equipment and ballots would be stored securely, who would be involved and have access, what training those people would have, what standards and procedures they would follow, and what documentation would be required during the review.

The senator attended the Jan. 6 Trump rally in Washington that led to a deadly assault on the Capitol. He has said he left as soon as the protest turned violent, but videos pieced together by online sleuths in May appear to show Mastriano stuck around longer and advanced closer to the Capitol than he’s acknowledged.

In June, Mastriano traveled to Arizona to get a firsthand look at the widely condemned partisan review that’s been underway in Maricopa County for months.

Republican leaders of the GOP-controlled legislature have largely stayed mum about Mastriano’s inquiry. Support for a partisan investigation has become a litmus test for Pennsylvania Republicans eyeing runs for governor or U.S. Senate next year.

However, one of Mastriano’s potential rivals for the gubernatorial nomination, GOP State Sen. Dan Laughlin, said the attempt to discredit the results “runs headlong into an unmistakable truth.”

“Donald Trump lost Pennsylvania because Donald Trump received fewer votes,” he wrote in an opinion article.

Staff writer Jonathan Lai contributed to this article.