If both the president and the vice president can no longer serve, the next in line to become president is the Speaker of the House of Representatives.

Under the Presidential Succession Act and the Constitution, the line then continues if the Speaker also cannot serve. In order, it goes:

  1. Speaker of the House.
  1. President pro tempore of the Senate.
  1. Then Cabinet officers, starting with the Secretary of State and proceeding through the other departments in a legally specified order.

This system is designed to ensure there is always someone clearly designated to step in as president in a crisis.