The news that President Trump has tested positive for the coronavirus is stunning on many levels — personal, electoral and legal. As of now, there is no indication that Trump has symptoms, let alone a severe case. Nevertheless, it is important for the country to understand in advance what the legal picture might be if his condition significantly worsens. The law is mostly clear about how to handle a president who falls seriously ill, but it’s not hard to envision a legal scenario that spins out of control quickly.

The key provision is the 25th Amendment. The original Constitution provided that the vice president steps in when the president is incapacitated, but it said nothing about how the president’s incapacity was supposed to be determined. As a result, we have had long stretches (when President James Garfield was shot; when President Woodrow Wilson had a stroke) where the vice president should have been in charge, but instead the president’s staff or spouse ruled. Enacted in the 1960s after John F. Kennedy was assassinated and at the height of the Cold War, the 25th Amendment finally provided a clear process, with the aim of ensuring that there is always a hand at the helm.

Section 3 of the amendment allows the president to transfer power voluntarily to the vice president. To do this, Trump would send formal notice to the speaker of the House and president pro tempore of the Senate, declaring that he is “unable to discharge the powers and duties of his office.” Upon transmitting this declaration, Vice President Pence would become acting president — those powers and duties would all go to him. Whenever Trump felt able again, he would send a new declaration and immediately take back control.

Invoking Section 3 is totally up to the president. But for a variety of reasons (the desire to project strength, to maintain continuity and calm, optimism about one’s health, denial about one’s health, paranoia about losing power), presidents are generally unlikely to use this provision unless it is absolutely necessary. Section 3 has been used only three times: once by President Ronald Reagan, twice by George W. Bush. Each time involved the president receiving general anesthesia for surgery for a few hours. It was not invoked when Reagan was shot and almost killed in 1981; it certainly should have been, but the president and his aides never seriously considered it.

Recognizing that the president might be incapacitated but unwilling to admit it — or, more problematically, unable to admit it because he is unconscious — the 25th Amendment also includes Section 4, which transfers power without the president’s consent. Instead of Trump transmitting his declaration declaring he is “unable,” Pence and a majority of the core members of the Cabinet do so (there are either 14 or 15; it is unclear whether Chad Wolf, the sole acting member of the Cabinet, can legally participate). As in Section 3, power immediately transfers to the vice president. If Pence and the Cabinet members did invoke Section 4, then whenever Trump felt able enough to resume his duties, he would send a declaration to that effect, kicking off a four-day waiting period during which Pence would stay in control. If Pence and a majority of the Cabinet did not disagree with Trump’s declaration within those four days, Trump would retake his powers. If Pence and the Cabinet did disagree, the question would get kicked to Congress, with Pence in charge in the interim. Unless both chambers agreed by a two-thirds majority, within 21 days, that Trump was unable to serve, Trump would retake power. But even if Trump lost the congressional vote, he would not be removed from office, and he could try again and again to retake his powers using the same process.

Section 4 thus stacks the deck heavily in the president’s favor in a contested case — impeachment requires far fewer ducks to be aligned in a row against him. It does so on purpose. The point of Section 4 is to transfer power swiftly and certainly when the president is completely incapacitated (as when he is comatose) but to protect the president from being stripped of power in all but the most clear-cut situations. By making it hard to invoke, Section 4 ensured that it would not be used against a president who was merely “unfit” for office. It really is about incapacitation — the unmanned helm.

The 25th Amendment has an important limit: It operates only when the president is incapacitated and when there is a vice president. The drafters of the amendment recognized that they were leaving a big hole — what if the president and vice president are both incapacitated? — but they believed that the amendment was too long and complicated as it was.

So far, there’s no indication that Pence has been exposed to anyone who has tested positive for the virus, and the vice president tested negative Friday morning. But if he were to get sick while Trump does and become incapacitated, the Presidential Succession Act of 1947 says that House Speaker Nancy Pelosi is next in line. The Constitution, though, provides no process and no standards for such a transfer of power. What if Pelosi and Pence disagree about his condition? What if Secretary of State Mike Pompeo objects, raising the numerous serious arguments that scholars and lawmakers have made over the decades that it is unconstitutional for congressional officials to be included in the line of succession statute? This could put us in the unacceptable situation of having two people claiming to wield presidential power, with no clear answers about who is right — possibly with an election happening at the same time, or with votes being challenged in court afterward.

The Constitution and the line of succession statute are premised on the notion that our top officials will proceed sensibly and in good faith, with due regard for the country’s need for steady leadership. But those qualities seem to be in shorter supply today than they were in 1787 and 1967. They are in even shorter supply a month before Election Day. Again, we should not get ahead of ourselves here. But knowing what danger looms, it’s extraordinarily important not only that Trump quarantine right now, but also that Pence stay virus-free and generally healthy.