Before he entered politics, Mubarak was a career officer in the Egyptian Air Force. He served as its commander from 1972 to 1975 and rose to the rank of air chief marshal in 1973. In 1975, he was appointed vice president by President Anwar Sadat and assumed the presidency after his assassination in 1981. Mubarak's presidency lasted almost thirty years, making him Egypt's longest-serving ruler since Muhammad Ali Pasha, who ruled the country for 43 years from 1805 to 1848. Before he stepped down, Mubarak was also the fourth-longest serving Arab leader, after Libyan leader Muammar Gaddafi, Sultan Qaboos Bin Said of Oman, and Yemeni President Ali Abdullah Saleh.