Vice-presidential candidates Sarah Palin and Joe Biden will face off in their first and only debate this Thursday in St. Louis, Mo. Quite a few Explainer readers have asked what would happen if one of the presidential candidates were to die or become otherwise incapacitated before Election Day: Would Palin or Biden assume the nomination?

Not necessarily. Each party has its own protocol for this scenario, but in neither case does the running mate automatically take over the ticket. If John McCain were to die before the election, the rules of the Republican Party authorize the Republican National Committee to fill the vacancy, either by reconvening a national convention or by having RNC state representatives vote. The new nominee must receive a majority vote to officially become the party candidate. If Barack Obama were to die before the election, the Democratic Party’s charter and bylaws state that responsibility for filling that vacancy would fall to the Democratic National Committee, but the rules do not specify how exactly the DNC would go about doing that. (Congress could also pass a special statute and push back Election Day, giving the dead candidate’s party time to regroup.)

What happens if the party doesn’t have time to select and endorse a new candidate? In 2000, Akhil Reed Amar outlined for Slate some of the head-scratching scenarios that might occur if a candidate died just before the election, without enough time to prep new ballots or to decide how votes should be counted.

The outcome would be a little more straightforward—though not necessarily more politically satisfying—if the candidate dies between the general election on Nov. 4 but before the Electoral College votes on Dec. 15. There’s no federal law that mandates how electors must cast their votes; theoretically, if the candidate to whom they were pledged dies and their party has not made a preferred successor clear, electors can vote for their party’s VP candidate, a third-party candidate, or a leading preconvention contender within their own party. Under this scenario, however, individual state laws have the potential to make things murky, given that each state has the power to determine exactly how its electoral votes are to be cast and distributed.

Bonus Explainer: What if the candidate dies after the election but before the inauguration on Jan. 20? The 20th Amendment states that if the president-elect dies before beginning his term, then the vice president-elect assumes his or her spot. However, the point at which a candidate officially becomes “president-elect” is debatable. He or she definitely assumes the title after Jan. 6, when a joint session of Congress officially counts the Electoral College votes and declares a winner. But the shift could be said to occur immediately after the Electoral College vote. (See Pages 2 and 3 of this PDF article from the Arkansas Law Review.)

If a candidate dies after Dec. 15 but before Jan. 6, Congress, when it convenes, has to decide whether to count the votes cast for him. (In 1872, three electoral votes cast for the late Horace Greeley were discounted by Congress, but it’s unclear whether votes cast for a living candidate who subsequently dies would be treated the same way.)

If Congress decides the votes are valid, then the laws of presidential succession kick in, and that candidate’s running mate moves up the ladder. If Congress decides to throw out the votes, then the question becomes whether the living candidate can be said to have a majority of the overall electoral votes—if not, then, according to the 12th Amendment, the House of Representatives must elect the president from among the three candidates with the most votes.

Got a question about today’s news? Ask the Explainer.

Explainer thanks Bruce Ackerman of Yale Law School, John Fortier of the American Enterprise Institute, Heather Gerken of Yale Law School, Nathaniel Persily of Columbia Law School, and Michael Czin of the Democratic National Committee.