Mr. Kelly, a former astronaut and the husband of former Representative Gabrielle Giffords, has maintained a steady lead over Ms. McSally, a former military pilot. If Mr. Kelly wins, state election law stipulates a final canvass of the balloting be completed by the end of November, barring legal challenges.

On Friday, Republican and Democratic election attorneys told The Arizona Republic that such a scenario was possible — a possibility embraced on social media by progressives grappling with the dark and unnerving prospect of a high-stakes court fight with an uncertain outcome.

“Everything in statute suggests it happens very quickly after the election results are finalized,” Mary O’Grady, a Democratic election lawyer, told the paper.