Fortunately for the USA, there has never been a case, in which any statesman except the vice president had to take office instead of the president. The law, which regulates the hierarchy of succession, is called the Presidential Succession Act. It was first signed during George Washington's presidential term. The act has been changed several times since then.

The last version of the Presidential Succession Act was passed in 1947. By signing it, Harry Truman placed the speaker of the house next to the vice president in the line of succession. The Senate president pro tempore comes next in the hierarchy. So, if the speaker is unable to assume office, he is replaced by him.

More Info: