President John F. Kennedy’s death on November 22, 1963, traumatized a nation and led a united Congress to make a constitutional change, in the form of the 25th amendment.

Kennedy’s assassination created moments of chaos in the federal government that afternoon. Vice President Lyndon Johnson was in the same motorcade as Kennedy, and there were early, erroneous reports that Johnson was also wounded.

As the country came to grips with the assassination, Johnson made sure the moment when he took the oath of office, about two hours after Kennedy’s death, was documented, so the nation knew a constitutional change of office had taken place.

Johnson stood by his wife, Jackie Kennedy, and Judge Sarah T. Hughes as he took the oath at Love Field in Dallas in a now-iconic photograph.

But Kennedy’s sudden passing accelerated an argument about a constitutional change that had been in the works in Congress in 1963.

Technically, the Constitution never spelled out how a Vice President would become President if a President died, resigned or was unable to perform the office’s duty.

This oversight became apparent in 1841, when the newly elected President, William Henry Harrison, died about a month after becoming President. Vice President John Tyler, in a bold move, settled the political debate about succession.

There was a debate in Congress about what powers Tyler had and what he should be called (Acting President, President or Vice President). Tyler settled the debate by asking a local judge to administer the presidential oath, and he fought all attempts by his many political foes to treat him as anything but the legitimate President of the United States.

In the following years, presidential successions happened after the deaths of six presidents, and there were two cases where the offices of President and Vice President almost became vacant at the same time. The Tyler Precedent stood fast in these transition periods.

Furthermore, there was no constitutional way to replace a Vice President who had vacated office or to handle a situation where a President became incapacitated while in office.

By 1963, Congress was debating an attempt to amend the Constitution to clear up all succession matters and add a procedure for dealing with a leader who became unable to perform the office’s duties temporarily or permanently. This became a bigger issue with the realities of the Cold War and with President Dwight Eisenhower’s illnesses in the 1950s.

The influential Senator Estes Kefauver had started the amendment effort during the Eisenhower era, and he renewed it in 1963. Kefauver died in August 1963 after suffering a heart attack on the Senate floor.

With Kennedy’s unexpected death, the need for a clear way to determine presidential succession, especially with the new reality of the Cold War and its frightening technologies, forced Congress into action.

The new President, Lyndon Johnson, had known health issues, and the next two people in line for the presidency were 71-year-old John McCormack (the Speaker of the House) and Senate Pro Tempore Carl Hayden, who was 86 years old.

Senator Birch Bayh had replaced Kefauver on the Senate subcommittee that considered constitutional amendments, and he tried to get a version of the Kefauver amendment approved in Congress in 1964, after Kennedy’s death. That first effort failed, but Bayh, with President Lyndon Johnson’s support, proposed it again right after Johnson’s inauguration in January 1965.

Within three months, the House and the Senate agreed on the wording of what would become the 25th Amendment, and in July 1965, Nebraska became the first state to ratify the proposed amendment. Nevada was the 38th state to ratify the amendment, in February 1967, making it the law of the land.

Section 1 of the 25th Amendment made it clear that the Vice President became President when the presidency became vacant under three circumstances: death, resignation, and removal from office.

Section 2 gave the President the power to name a new Vice President, if that office became vacant, with the permission of Congress.

The amendment’s other two sections detail the process for the Vice President to serve as Acting President if the President was unable to perform his or her official duties, and how to resolve disputes about the President’s ability to discharge official powers.

The 25th Amendment would receive its first test in October 1973, when Vice President Spiro Agnew resigned. Gerald Ford became the new Vice President in December 1973, after President Richard Nixon nominated Ford for congressional approval.

Ford himself invoked the 25th Amendment nine months later, when he nominated Nelson Rockefeller as Vice President, after Nixon’s resignation.

Scott Bomboy is the editor in chief of the National Constitution Center.