mubarak became the vice-president of the republic of egypt after moving up the ranks of the egyptian air force. then he became the president after president anwar sadat was assassinated on 6 october 1981. his almost thirty-year presidency made him egypt's longest-serving ruler since muhammad ali pasha.