CAIRO (Agencies) - Hosni Mubarak was president of Egypt for 30 years and resigned on the 18th day of protests against his rule. Here is a timeline of his rule. May 4, 1928: Born in a village in Egypt's Nile Delta. Oct 6, 1981: Thrust into office when Islamists gun down President Anwar Sadat at a military parade. He is approved as president in a referendum in November and re-elected in October 1987 and October 1993. June 26, 1995: Gunmen attack his car as he arrives at an African summit in Addis Ababa. He is unhurt. Oct 5, 1999: Sworn in as president for his fourth term and names Atef Obeid as prime minister after the government led by Kamal Ganzouri resigns. Dec 22, 1999: Egypt agrees to sell its natural gas through what Israeli Prime Minister Ehud Barak's office dubs a "Pipeline of Peace". March 2005: Street protests by the Kefaya (Enough) Movement draw hundreds across Egypt to oppose a fifth term for Mr Mubarak or any attempt to install his son Gamal in his place. May 11, 2005: Parliament votes to change the constitution to allow contested presidential elections. Sept 27, 2005: Mr Mubarak is sworn in for a fifth consecutive term after winning the first contested presidential election on Sept 7. Rival Ayman Nour is the only member of parliament to remain seated during the ceremony, apparently to show his refusal to accept the official vote count. Dec 8, 2005: The Muslim Brotherhood increase their seats in parliament to 88 after an election marred by violence, but Mr Mubarak's party retains a big majority. Eight people were killed on the last day of voting on Dec 7. Nov 19, 2006: Mr Mubarak says he will retain his responsibilities for the rest of his life. June 4, 2009: US President Barack Obama in a speech in Cairo calls for a "new beginning" in ties between Washington and the Islamic world. March 26, 2010: Former U.N. nuclear chief Mohamed ElBaradei makes first public appearance after his return to Egypt in February. March 27, 2010: Mr Mubarak returns to Egypt to reassume presidential powers after three weeks recovering from gallbladder surgery in Germany. Jan 25, 2011: Street protests begin after an online campaign calling for an end to Mr Mubarak's rule. Feb 11, 2011: Mr Mubarak steps down on the 18th day of protests that have killed an estimated 300 people.