The door to the Board of Elections office on the first floor of City Hall will swing shut at precisely 5 p.m. Tuesday, petition day.

By that time, would-be candidates in Philadelphia’s May 21 primary must have filed their nomination petitions to have any chance of gaining a spot on the ballot.

Based on potential candidates’ expressed intentions, it’s shaping up as an unusually competitive election, from the Democratic primary for mayor through the crowded contests for City Council’s seven at-large and 10 district seats.

State Sen. Anthony H. Williams plans to file petitions in the Democratic primary for mayor, apparently making him the second well-known challenger trying to deny Mayor Jim Kenney a second term. Former City Controller Alan Butkovitz entered the primary race in November, while Williams had been inching closer to a campaign after finishing second to Kenney in the 2015 primary.

On the Republican side, the party’s endorsed candidate, ward leader Daphne Goggins, who has engaged in a caustic and controversial early battle with Democrat-turned-Republican Billy Ciancaglini, dropped out of the race Monday night in a Facebook Live speech. Ciancaglini had vowed on Facebook on Saturday to challenge Goggins’ petitions.

The filing deadline is the traditional start of challenge season, when politicians or their proxies go to court in an effort to get potential primary opponents knocked off the ballot for alleged problems with their paperwork.

Challenge season was already off to an early start this year because two former Traffic Court judges, Thomasine Tynes and Willie Singletary, are circulating petitions to seek Council at-large seats despite spending time in federal prison for lying to investigators in a corruption probe.

Attorney Kevin Greenberg, an election law expert at the firm Greenberg Traurig, said Friday he would contest in court the candidacies of Tynes and Singletary if they file petitions Tuesday.

“These individuals were entrusted with public service and abused that trust,” Greenberg said. “They’ve had their due process, and at this point the Pennsylvania Constitution is crystal clear that they should never again be placed in a position to abuse the people of Pennsylvania.”

Article 2, Section 7, of the Pennsylvania Constitution says people “convicted of embezzlement of public moneys, bribery, perjury, or other infamous crimes” are ineligible to hold “any office of trust or profit” in the state.

A legal challenge to the candidacies of Tynes and Singletary could settle what appears to be an open question: If the state constitution prohibits their serving in public office, does that mean they can’t run for elected office?

Tynes, the former president judge of Traffic Court, was sentenced to 23 months in prison; Singletary served 20 months. The 2013 indictments of nine judges, a former court official, and two business owners prompted the Assembly to shut down the notoriously corrupt Traffic Court. Voters in a 2016 statewide referendum approved abolishing Traffic Court.

Both former judges question whether the prohibition on felons holding public office applies to elected office in Philadelphia.

“I’m prepared for any challenges,” Singletary said. “My case does not prohibit me from running for office.”

The U.S. Court of Appeals for the Third Circuit upheld the convictions for Tynes and Singletary on Jan. 18. That ruling also said Singletary, who served 20 months in prison, should be resentenced. That’s set for Wednesday.

A third former Traffic Court Judge, Mike Lowry, appeared last month on the roster of people who pulled nomination petitions for Council seats. Lowry, who refused to comment when it was first reported, said last week that he had been demonstrating the online petition-creation process for someone and did not realize it would generate a petition listing his name as a candidate.