On Jan. 8, 2019, a new governor of Florida will be sworn in. On that same day, three of the Florida Supreme Court’s seven justices will complete their final terms. Based on those facts alone, you might assume that the new Florida governor will have the opportunity to select these justices’ replacements. That, however, is not at all clear—because current Republican Gov. Rick Scott has declared his intent to replace them hours before his term concludes. He is now moving forward with this plan to pack the court. And the only people who can stop him are the current justices themselves.

To carry out this scheme, Scott has seized upon language in the Florida Constitution which, he asserts, gives him to power to make “midnight appointments” (as one Scott ally has described them). Under the state constitution, a new governor’s term begins “on the first Tuesday after the first Monday in January.” Meanwhile, a retiring justice’s term ends “on the first Tuesday after the first Monday in January.” Due to mandatory age limits, three justices—all left-leaning—face mandatory retirement on this date. The question is when, precisely, their retirement takes effect.

Scott insists that the justices’ terms expire at the stroke of midnight on Jan. 8, but that his own term does not end until his successor is sworn in on that day, typically at noon. Thus, he believes he will have about 12 hours to name three new justices, shifting the court to the right for a generation. Scott announced this plan when he appointed his first justice in 2016, declaring: “I will appoint three more justices on the morning I finish my term.”

Alarmed by this prospect, Common Cause and the League of Women Voters filed a lawsuit urging the Florida Supreme Court to rule that the next governor, not Scott, is constitutionally authorized to make the appointments. Their arguments are difficult to contest. The suit cites a slew of cases in which Florida courts determined that, when “a period of time expires on a date,” it expires at the end of that date. On matters ranging from the terms of a contract to the length of a legislative session, the courts have found that the clock runs out “at midnight” at the end of the final day. For instance, one case found that “when a contract requires payment by June 1, there can be no default until the clock strikes midnight on June 2.” Applied here, this rule means the retiring justices’ term runs through Jan. 8 and expires when the clock strikes midnight on Jan. 9.

Strong as this claim may be, the Florida Supreme Court has refused to entertain it. In December, the court tossed the lawsuit, holding that “the issue presented is not ripe for consideration.” Then, in a rather cryptic passage, it clarified that it could not resolve the dispute “until some action is taken by the Governor” to fill the three seats. This caveat left open the possibility that the court might reconsider the matter once Scott takes some concrete “action” to replace the retiring justices.

That time is now. On Tuesday, Scott asked Florida’s Judicial Nominating Commission to begin accepting and reviewing applications for the court. Under state law, this nine-member body will have 60 days to nominate three to six candidates for each vacancy. This means the names will be finalized shortly after the November election. Scott has stated that he will let the winner of that election interview the finalists, in the hopes that he and the governor can jointly select the justices. Incoming Republican Gov. Jeb Bush and outgoing Democratic Gov. Lawton Chiles did exactly that in 1998. But there’s virtually no chance that, if Democratic candidate Andrew Gillum wins, he and Scott will agree on the selections.

It’s easy to see why Scott is so desperate to make these three appointments.

There are three further wrinkles here. First, Scott is running for Senate, and if he wins, he will be sworn in on Jan. 3, 2019, and forced to step down as governor at that time. His Lt. Gov. Carlos López-Cantera would therefore have to make the midnight appointments—lending them an even stronger whiff of illegitimacy, since he would serve as governor for less than five days. Second, the Judicial Nominating Commission is dominated by Scott appointees. Although the board has traditionally put forth candidates across the ideological spectrum, Democrats are worried that Scott’s allies will only select conservatives. As a result, even if Gillum won and secured the right to fill the three vacancies, he might have to choose from a right-leaning list.

Third—and perhaps most ominously for Florida’s democracy—Scott’s plan could lead to a bona fide constitutional crisis in which two people claim to be governor at once. Although Florida’s governors are usually sworn in around noon, their terms begin at midnight by the plain language of the state constitution. So, theoretically, if Gillum won, he would become governor at 12 a.m. on Jan. 8. But is a governor really governor until he’s sworn in? No one seems to know, and so Gillum could demand a midnight swearing-in ceremony, as past governors have, to avoid appointments chicanery.

But what if Scott (or López-Cantera) refuses to acknowledge the validity of this swearing-in? What if he insists that he remains governor until noon, and both men attempt to make dueling appointments? The only proper mediator of this dispute would be the Florida Supreme Court—the very cause of the quarrel. So the three justices in question could be asked to rule on who is governor, and whether or not it’s their final day in office on their disputed final day in office. This farcical nightmare scenario is not at all far-fetched.

It’s easy to see why Scott is so desperate to make these three appointments. Throughout his nearly eight years as governor, the Florida Supreme Court has been a thorn in his side, blocking abortion restrictions and GOP-drawn gerrymanders. If Scott can flip the court, he will leave Florida susceptible to draconian anti-abortion laws and Republican-friendly partisan districts. It’s fundamentally undemocratic for an outgoing governor to install a court on his way out the door that will neuter his successor’s agenda. Voting rights advocates should take their case back to the court now that Scott has formally triggered the replacement process. As the governor knows as well as anyone, the countdown to a crisis has begun.