Since 1789, eight U.S. presidents have either died or been killed while in office. One has resigned.

On the death of the eight men and the resignation of the other, their vice presidents stepped into the role of president, following the requirement laid out in the Constitution for an orderly change of leadership.

But what would happen if the president and the vice president were simultaneously unable to carry out their duties? Who would step in to be president?

The Presidential Succession Act of 1947 outlines the order of succession to the presidency with a list that includes congressional members and those serving in the president's cabinet. Congress is authorized to enact legislation concerning the order of succession under Article II, Section 1, Clause 6 of the U.S. Constitution. The Twentieth Amendment, adopted in 1933, and the Twenty-fifth Amendment, adopted in 1967, also address who will sit in the Oval Office and under what circumstances.

There have been three presidential succession acts passed in the country’s history, with the 1947 act being the latest.

In 1792, the act declared that, the president pro tempore of the Senate would be first in line for the presidency should the president and the vice president both be incapacitated. The speaker of the House was second in line.

The 1886 act replaced the president pro tempore and speaker on the list with the members of the president’s cabinet.

The order of succession reflected the order in which the cabinet positions had been created, with the secretary of state first in line after the vice president.

In 1947, the president pro tempore of the Senate and the speaker of the House were brought back in to the line of succession. This time, the speaker of the House was first in line behind the vice president, and the president pro tempore second in line. Members of the cabinet fill out the line as they did in the 1886 act, by when the cabinet positions were created.

Here is the line of succession for the United States government:

1. Vice President

2. Speaker of the House of Representatives

3. President pro tempore

4. Secretary of State

5. Secretary of the Treasure

6. Secretary of Defense

7. Attorney General

8. Secretary of the Interior

9. Secretary of Agriculture

10. Secretary of Commerce

11. Secretary of Labor

12. Secretary of Heath and Human Services

13. Secretary of Housing and Urban Development

14. Secretary of Transportation

15. Secretary of Energy

16. Secretary of Education

17. Secretary of Veterans Affairs

18. Secretary of Homeland Security