Television shows are writing the 25th Amendment into their ripped-from-the-headlines storylines. Pundits debate the possibilities of the removal and succession of the president if he is incapacitated. Even former FBI Director James Comey has weighed in on whether Donald Trump is “medically unfit to be president.” (He doesn’t think so.) In the unlikely — but politically fascinating — event that a Cabinet were to use the power to oust a sitting president, what would come next?

Let’s take a deeper look at the 25th Amendment and think about what each section of it has meant in the past — and what it might mean for Trump-era politics.

Section 1. In case of the removal of the President from office or of his death or resignation, the Vice President shall become President.

The amendment’s initial section revisits what Article II of the Constitution set up from the beginning — the vice president takes over if the president dies or is unable to serve — but with clearer language to clean up previous constitutional confusion. When William Henry Harrison died shortly after his inauguration in 1841, there were questions about whether John Tyler, nicknamed “His Accidency,” was truly the president or just an “acting” president of some kind. Tyler made clear his intent to fully occupy the office and do everything an elected president would have done — and he forged his own path separate from Harrison. Since then, seven presidents have taken office after a presidential death (all before the 25th Amendment was ratified) and one after a resignation. In this way, the amendment codified the status quo.

What this means now: Many have already discussed the possibility of a President Pence. But it’s worth underscoring how much he represents a different, more establishment brand of Republicanism than Trump. If Trump were to be removed for incapacity, it would be an interesting test of whether Trumpism could survive if carried out by a leader with a very different temperament and political profile — or if that leader would abandon Trumpism altogether.

Section 2. Whenever there is a vacancy in the office of the Vice President, the President shall nominate a Vice President who shall take office upon confirmation by a majority vote of both Houses of Congress.

Before this, if the vice president became president, there was … no vice president. That exact situation accounted for 24 years of U.S. history, including a period just before Congress took up the 25th Amendment in 1965. From taking the oath of office in November 1963 until he and Hubert Humphrey were sworn in after winning election in 1964, Lyndon Johnson had no vice president. Instead, the next two people in line (per the 1947 Presidential Succession Act) were both in poor health and, in the words of Roll Call’s David Hawkings, “a combined 157 years old.” This section of the 25th Amendment has since been invoked twice, when Spiro Agnew resigned in 1973 and Richard Nixon chose Gerald Ford to replace him, and when Ford succeeded Nixon as president in 1974 and chose Nelson Rockefeller as his VP.

What this means now: If Pence became president, he could choose his own veep, subject to congressional approval. Depending on party control of Congress, that could get interesting. It would offer a chance for Pence to either choose a Trump ally or move the party in a different direction. Pence’s choice could say a lot about whether invoking the amendment was a reaction to Trump personally or a repudiation of his overall approach to politics.

Section 3. Whenever the President transmits to the President pro tempore of the Senate and the Speaker of the House of Representatives his written declaration that he is unable to discharge the powers and duties of his office, and until he transmits to them a written declaration to the contrary, such powers and duties shall be discharged by the Vice President as Acting President.

This section seems like it should be pretty straightforward. It was invoked without controversy twice in the early 2000s when President George W. Bush signed over power to Vice President Dick Cheney for a few hours during sedation for routine medical procedures. But it can get fuzzy.

The 25th Amendment wasn’t invoked when Ronald Reagan was shot in 1981, despite the fact that the White House physician kept a copy of the amendment in his bag. Bill Clinton didn’t formally put Section 3 provisions in place when he had knee surgery in 1997, saying that he was never under general anesthesia. However, Clinton’s press secretary indicated that the chief of staff had been in close contact with Vice President Al Gore’s staff in case “anything about the 25th Amendment is indicated.”

And there is disagreement on whether Reagan properly invoked the 25th Amendment in 1985 when he underwent surgery to remove a polyp from his colon. Reagan submitted letters to the House speaker and Senate president pro tempore designating Vice President George H.W. Bush as acting president, citing an “existing agreement” between the two. The letters also stated that Reagan was not specifically activating the process laid out in the 25th Amendment and that he did not believe that “the drafters of this Amendment intended its application to situations such as the instant one.”

Some argue that this message reflected the basic spirit of the 25th Amendment, while others suggest that because it wasn’t a formal invocation, it’s not really an instance of a president using the 25th Amendment.

What this means now: When people talk today about invoking the 25th Amendment, they aren’t talking about Trump having minor surgery and temporarily handing the reins to Pence. But the resistance of earlier presidents to using the 25th Amendment in such cases, even though the amendment seems directly designed for those instances, illustrates the depth of the struggle and complications over control of presidential power.

Section 4 (first paragraph). Whenever the Vice President and a majority of either the principal officers of the executive departments or of such other body as Congress may by law provide, transmit to the President pro tempore of the Senate and the Speaker of the House of Representatives their written declaration that the President is unable to discharge the powers and duties of his office, the Vice President shall immediately assume the powers and duties of the office as Acting President.

Here’s where we transition from historical explanation to future speculation. This section has never been invoked, and it has a number of ambiguous phrases that leave it open to a range of possibilities. For starters, who exactly gets to decide that the president isn’t able to serve? The conventional interpretation of the amendment is that it needs the vice president plus a majority of the Cabinet.

But with the deciders well agreed upon, if not explicitly spelled out, what does “unable to discharge powers and duties of the office” mean, and who gets to provide the definition? The context for the 25th Amendment was pretty clearly aimed at the kind of physical and mental incapacities that come after strokes, heart attacks and bullets. Woodrow Wilson’s stroke, Dwight Eisenhower’s heart attack and John F. Kennedy’s assassination (and the related worry about what would have happened if he had survived but been incapacitated) all informed the debate about the amendment. But there’s nothing in the text that actually requires a diagnosis.

What this means now: This could end up being a test of the authority of the Cabinet as much as anything else. The amendment empowers the Cabinet to take this action. But what we see with Section 3 is that a lot of anxiety about giving up power still looms over the process. Even if the Cabinet followed the letter of the law, it might still look like a palace coup. In order to get around this, the Cabinet has to have a certain amount of stature — an issue that would be put to the test if it sought to remove the commander in chief.

Section 4 (second paragraph). Thereafter, when the President transmits to the President pro tempore of the Senate and the Speaker of the House of Representatives his written declaration that no inability exists, he shall resume the powers and duties of his office unless the Vice President and a majority of either the principal officers of the executive department or of such other body as Congress may by law provide, transmit within four days to the President pro tempore of the Senate and the Speaker of the House of Representatives their written declaration that the President is unable to discharge the powers and duties of his office. Thereupon Congress shall decide the issue, assembling within forty-eight hours for that purpose if not in session.

In other words, the 25th Amendment provides a way for the president to respond to accusations of a lack of fitness. And that’s where things get interesting. After the president offers a declaration that he or she is able to serve, the Cabinet has four days to object and respond. But who gets to be president during that time? The text isn’t clear. It goes on to say:

If the Congress, within twenty-one days after receipt of the latter written declaration, or, if Congress is not in session, within twenty-one days after Congress is required to assemble, determines by two-thirds vote of both Houses that the President is unable to discharge the powers and duties of his office, the Vice President shall continue to discharge the same as Acting President; otherwise, the President shall resume the powers and duties of his office.

Many parts of the Constitution are vague, but this one sets the country up for a pretty wild ride. Constitutional scholar Brian Kalt points out: “Section 4 is drafted less than perfectly. The best reading of Section 4’s text — and the clear message from its drafting history — is that when the president declares he is able, he does not retake power until either (1) four days pass without the vice-president and Cabinet disagreeing; or (2) he, the president, wins the vote in Congress. But the text is ambiguous on this point and commentators have frequently misread it as allowing the president to retake power immediately upon his declaration of ability.”

This opens up a possibility that Kalt describes in detail in his book “Constitutional Cliffhangers,” in which the country ends up with two presidents and two Cabinets. In the fictional scenario, the vice president and 11 Cabinet members agree to remove a president whose behavior has been erratic. But she conspires with her chief of staff to “declare that no inability exists,” reclaims power, and fires and replaces the Cabinet that removed her. In this setup, an amendment aimed at preventing a constitutional crises has now created one.

Kalt and others have pointed out that, in addition to the ambiguity of the text, it is difficult to remove a president through the 25th Amendment. In the event that the president disagrees about the incapacity issue, the amendment requires two-thirds of the House and Senate to remove him or her (as opposed to the impeachment process, which requires a simple majority of the House to impeach and two-thirds of the Senate to convict).

What this means now: The provision of the amendment that everyone’s been talking about is the one we know the least about. Since the 25th Amendment was ratified, presidents, vice presidents and White House officials have tread very cautiously around the provisions of Section 4. It seems fairly safe to say that there are lingering legitimacy issues when it comes to members of the executive branch actually talking about removing the president and replacing him or her with the vice president. And even under perfectly innocuous circumstances, presidents seem very reluctant to entertain the idea of being temporarily replaced under the amendment’s provisions.

All of this points to a conclusion we probably already knew: The Cabinet, especially as it’s currently constituted, is pretty unlikely to take action against Trump. But Congress has its own set of political pressures, and if the Democratic “wave” happens, we may see a serious attempt to go after the president. If impeachment proceedings don’t get off the ground, Congress could turn to the 25th Amendment: While Congress can’t initiate removal of the president under the amendment, it can convene a body to investigate the president’s fitness to serve — and such legislation has already been proposed.

Convening an investigative commission might seem like a bureaucratic and indirect step compared with the drama of impeachment. But such a commission might be easier to sell to members of Congress who are wary of impeachment. It might also be a way to address the legitimacy issues that otherwise seem to plague the 25th Amendment — a president’s removal from office may be less likely to be seen as a coup if it comes from the people’s elected representatives. And voting to create a commission might be more palatable for congressional Republicans.

One of the arguments against invoking the 25th Amendment to remove Trump is that it wasn’t really intended for this purpose. But looking at how the amendment has been used in practice reveals that political context matters, and so does legitimacy. Presidents have avoided activating Section 3 of the article, appearing reluctant to concede even temporary power to their own vice presidents. And Section 4 spells out a process that is legally unclear. It’s likely that any discussion of the 25th Amendment will be about the politics of the moment rather than the precise text of its provisions. Whether we see it put into practice will depend on whether Congress or members of the Cabinet see political benefit in doing so. A critical part of that process would be to overcome the legitimacy challenges and political disruption that using the 25th Amendment would create.