WARSAW — Supporters of the mayor of Warsaw, joined by scores of Polish voters and rights groups, raced on Thursday to file legal challenges to the validity of Sunday’s presidential election, which he narrowly lost to the incumbent, President Andrzej Duda.
The rush to file the complaints was the result of a new electoral code passed by the government in May, cutting the time to file such challenges from 14 days to three.
In lodging the official protests with the nation’s Supreme Court, supporters of the mayor, Rafal Trzaskowski, were not expecting to overturn the result of the election, given the margin of defeat of nearly half a million votes.
Their object was more to expose what they said was a pattern of political interference that marred the country’s closest election since the end of communist rule in 1989 and to delay the certification of the vote long enough for it to be declared invalid.
If nothing else, the challenges will pose a test for a court system that has undergone sweeping changes since the governing Law and Justice party came to power five years ago. The government has been accused of undermining judicial independence and theoretically faces the prospect of becoming the first nation in the European Union to lose its voting rights.
Joanna Lemanska, the head of the Extraordinary Control and Public Affairs Chamber of the Supreme Court, which will rule on the validity of the election, was appointed by Mr. Duda. She suggested that she would step aside but has yet to do so.
Even if she does recuse herself, critics believe the special chamber is no longer an impartial arbiter of the law. But by overwhelming the judges with complaints, they hope to make it impossible for the judges to certify the results with the required 21 days.
Mr. Trzaskowski, who has not commented on the legal challenges, is scheduled to give a speech in the northern port city of Gdynia on Friday, where he will try to rally supporters against the government.
Borys Budka, the head of the main opposition party, Civic Platform, said on Thursday that there was growing evidence that the election was deeply flawed.
“These elections were not equal, didn’t meet democratic standards, they were dishonest,” he said. “Because of that, we demand that they are declared invalid.”
The most widespread irregularities were reported by the Polish diaspora, with tens of thousands of votes from abroad potentially left uncounted. But there were also reports of strange results in a number of nursing homes, which reported Mr. Duda winning 100 percent of the vote, and concerns about extra ballots sent to polling stations without proper documentation.
Cezary Tomczyk, the head of the mayor’s campaign team, said they had received reports from all around Poland of ballots that were not properly stamped.
“The election result is not just a simple statement of who won but also showing respect for every vote which was cast and or which couldn’t be cast,” he said in an interview on TVN24, a Polish broadcaster. “We don’t know the scale of irregularities. This can only be determined by the Supreme Court.”
His team set up a web page to help voters file protests, and he said several thousand had already been registered.
Some of the most troubling reports came from overseas, where a record 520,000 people had registered to vote before the election but only 415,951 ballots were counted. Complaints filed with the court charge that the Polish Foreign Ministry worked to suppress the number of voters.
In Britain, over 30,000 ballots — 16.6 percent — went missing, according to a calculation using public data by the Polish newspaper Gazeta Wyborcza.
With the voting done exclusively by mail in Britain because of the pandemic, Poland’s Foreign Ministry blamed the British Post Office and voters themselves for the problems.
Mr. Trzaskowski won the vote there by a wide margin, securing 112,207 votes to Mr. Duda’s 32,067.
In Germany, 11,500 ballots did not make it to the consulates on time to be counted, and similar problems were reported in other countries with large Polish populations.
“We can expect a record number of election protests because these elections — in my view — have been carried out in an unjust manner,” said Michał Wawrykiewicz, a lawyer from the Free Courts Initiative and Committee for Defense of Justice. “Never before have such situations taken place. Never before have we been dealing with such a massive party propaganda in the public media, which also influenced the result of the elections.”
Paulina Kieszkowska-Knapik, who joined her colleagues from the Initiative at the Supreme Court on Thursday afternoon to file their complaint, grew emotional over what she said was a deep injustice.
“The original sin,” she said, “was holding the election during a pandemic.” That, she said, was itself a violation of the Constitution.
Adam Bielan, the head of the Law and Justice election team, said the claims should be assessed by the Supreme Court, but that the review would not change the outcome.
“The advantage of President Andrzej Duda over Rafał Trzaskowski is so big that even if there had been inconsistencies, they could concern voters of both candidates,” he was quoted as saying by Gazeta Prawna, a legal newspaper. Other party officials did not return calls seeking comment.
As the deadline to file protests approached, volunteers from “Polonia Express,” a civic organization based in Britain, helped overseas voters to register complaints on time.
Over 2,900 people joined a Facebook group called “Electoral protests — Polonia has the right to vote.” The grass-roots initiative created forms for voters to fill out citing abuses like the voting package arriving too late or not at all.
Separately, protests were filed over the use of state television to bolster the Duda campaign.
The Supreme Court’s handling of the protests will be closely watched.
In the days between the first round of elections and the runoff contest on Sunday, the European Court of Justice heard arguments in one of several cases related to Poland’s changes in the judicial system, which critics said were designed to quash the courts’ independence.
“The whole judiciary system of the E.U. cannot work if courts are not independent,” Michal Gajdus said in the European court, which is based in Luxembourg.
Since 1989, judges in Poland had been selected by the National Council of the Judiciary. But in 2017, Mr. Duda signed new signed into law changes that critics said would enable the president to appoint judges sympathetic to the Law and Justice party.
The changes led the European Commission to trigger Article 7 of the Treaty on the European Union, the so-called nuclear option that could result in Poland losing its voting rights. But since that would require a unanimous vote by all 27 E.U. member countries, it is not likely to happen.
Monika Pronczuk and Anatol Magdziarz contributed reporting.