CAIRO Hosni Mubarak, president of Egypt for 30 years and a staunch U.S. ally, handed power to his deputy on Thursday, ending his one-man rule but not quitting his post.
His ignominious sidelining, apparently orchestrated by the military under fierce pressure from pro-democracy protesters, will reverberate across the Arab world and far beyond.
In an emotional speech to the nation, Mubarak said he was transferring presidential prerogatives to his newly appointed vice-president Omar Suleiman, but did not resign his post.
Mubarak, 82, once said he planned to "bear his responsibilities" as long as his heart was beating.
But one million or more angry Egyptians abruptly ended the autocratic leader's dreams of wielding power for life.
Their unquenchable determination to oust him, defying the vast security apparatus that enforced his writ, seems likely to have led the military to draw the curtain on the Mubarak era.
The struggle to overthrow Mubarak has plunged Egypt into uncertainty after decades of repressive stagnation.
Always dourly confident, never showing a trace of doubt about his lifetime achievements, Mubarak had posed as a benign and tireless leader protecting the security and stability of his country and serving the welfare of its people.
Reflecting his obsession with security, the former air force commander said 10 days ago that the surge of popular protests against him "impose on us a choice between chaos and stability."
His supporters can argue that he saved Egypt from chaos after militants assassinated his predecessor in 1981, kept Egypt out of wars, restored relations with the Arab world after the 1979 peace treaty with Israel and, after long delays, allowed his government to open up the economy to stimulate growth.
He also managed to suppress a long Islamist insurgency in southern Egypt in the 1990s after 1,200 people were killed.
But Mubarak's stubborn failure to change the corrupt and authoritarian political system he inherited finally caught up with him when he surrendered his powers to his intelligence chief and newly appointed vice-president, Omar Suleiman.
Ten days earlier he had been forced to promise he would step down before a presidential election due in September and to name a deputy for the first time since he took office.
In the last 17 days of tumultuous protests in Cairo and across the country, up to 300 people may have been killed, most of them by Mubarak's riot police, according to U.N. estimates.
The violence did not deter the crowds of demonstrators occupying Cairo's Tahrir (Liberation) Square, who have stuck doggedly to a simple demand: Mubarak must go and go now.
"Uninstalling dictator ... 99% complete," tweeted one Egyptian, Adel Shehadeh, hours before Mubarak's speech.
Mubarak's ouster uncannily follows the script written by Tunisian President Zine el-Abidine Ben Ali, who fled to Saudi Arabia on January 14, the day after he announced that after 23 years in office he would not stand again in 2014.
Mubarak, however, has vowed not to go into exile. "I will die in my country," he said in his speech to the nation.
Mubarak was born on May 4, 1928, in the Nile Delta village of Kafr el-Moseilha. He joined the military academy in 1947, later opting for the air force and further training which took him to the Soviet Union, where he learned to fly bombers.
In 1967 he became director of the air academy and in 1969 air force chief of staff. President Anwar Sadat chose him to command the air force and prepare it for the 1973 war against Israel. Two years later Sadat appointed him vice-president.
Mubarak narrowly escaped death when soldiers linked to a radical Islamist group shot Sadat dead at a military parade in Cairo on October 6, 1981. He has been the target of several assassination attempts since, including a spectacular attack on his motorcade in Addis Ababa in 1995.
Sadat, the architect of peace with Israel, had taken Egypt far from its leadership role in the Arab world and upset many Egyptians by aligning the country firmly with the United States.
Mubarak painstakingly restored ties with Arab states and was able to bring the Arab League back to Cairo.
After Iraqi President Saddam Hussein invaded Kuwait in 1990, Mubarak joined the United States and its allies in the campaign to drive the Iraqis out. In return he managed to win relief of Egyptian debts worth more than $20 billion.
But in public he strongly advised against the U.S. invasion of Iraq in 2003, correctly predicting that it would cause chaos.
He rode out former U.S. President George W.Bush's shortlived campaign for democracy in the Arab world, allowing multi-candidate presidential elections for the first time ever in 2005. But as soon as Bush lost interest he went back to his old ways, and the parliamentary elections of 2010 saw more abuses than any previous elections, rights groups say.
From the 1990s, Mubarak acted as an unofficial patron of the Middle East peace process, mediating between Palestinians and Israelis, and between rival Palestinian factions in an elusive quest for a settlement.
His Arab critics say he gave too much weight to U.S. and Israeli interests to the detriment of ordinary Palestinians.
After the Palestinian Islamist movement Hamas took control of the Gaza Strip in 2007 Mubarak went along with the Israeli blockade of the territory from the Egyptian side. When Israel attacked Gaza in early 2008 he allowed Israeli planes to fly over Egyptian territory on their bombing raids.
Mubarak, who has clung to power so long, finally hinted that he had made errors and apologised to his opponents.
"Your demands are legitimate and just. Mistakes are possible in any system and in any state but the important thing is to admit these mistakes and correct them," he told the nation.
(Editing by Angus MacSwan)