The will-he-won't-he speculation ended at around 4pm (GMT) on Monday during an elabroate and lengthy ceremony which kept observers guessing right to the end.

After Taylor departed, rebel leaders declared the war at an end.

Taylor is now expected to leave the broken shell of a nation founded by freed American slaves in the 19th century. At least 2,000 people perished in the most recent fighting with rebels for the capital Monrovia.

"I want to be the sacrificial lamb," Taylor said in a handover speech filled with religious and African imagery that began in a sombre tone and grew more upbeat as Taylor got into his usual confident stride.

"There are two things that I want for the people of Liberia, one that they live, two that they see peace ... Today for me is a day of moving forward. We must now put the past behind us."

"I leave you with these parting words, God willing I will be back," Taylor said.

Blah sworn in

Vice-President Moses Blah, a former brother-in-arms from the Liberian leader's days of bush war, was sworn in as president after Taylor's resignation.

Blah will stay until October and then hand over to an interim administration picked by warring factions and political parties at talks in Ghana, said Ghanaian President John Kufuor, also chairman of the West African regional bloc.

"It is our expectation that from today, the war in Liberia has ended."

Ghanaian President John Kufuor

Rebels drummed and sang that their troubles were over near the front line that cuts through the suffering capital Monrovia, where fighting has stranded hundreds of thousands without food. 
 
Asylum seeker

"It is our expectation that from today, the war in Liberia has ended," Kufuor said. Also on hand, were President Thabo Mbeki of continental power South Africa and Mozambique's leader Joaquim Chissano representing the African Union.

Boxed into a corner by rebels, under UN sanctions, wanted by Sierra Leone's war crimes court and told to quit by US President George W. Bush, Taylor had little choice but to go or fight to the death.

Diplomatic sources said Taylor would most likely leave with Mbeki for Nigeria, which has offered him asylum.

Looting

Final farewell - women dance outside the palace

No one knows what will happen once Taylor leaves the divided, hungry capital where rebels and loyalist militias are dug in opposite each other, observing a tenuous ceasefire under the watchful eyes of nearly 800 West African peacekeepers.

Gunfire rang out near central Monrovia on Monday morning as loyalist militias smashed into shops for some last-minute looting. Nigerian troops guarded the Executive Mansion for the ceremony amid plush velvet and gilded chairs.

Rebels grudgingly accept that they have no choice over Blah, but want a neutral interim government as soon as possible.

Taylor invaded Liberia in 1989 to overthrow dictator Samuel Doe. Seven years of civil war followed, and 200,000 people were killed. Taylor emerged as the strongest of a ruthless field of warlords and was elected in 1997.