Libya's interim National Transitional Council has handed power to a newly elected assembly, almost a year after the ousting of Muammar Gaddafi.
NTC chief Mustafa Abdul Jalil passed the reins to the oldest member of the legislative body at a late-night ceremony in the capital, Tripoli.
The NTC, which was formed during last year's revolt, has now been dissolved.
Crowds in central Tripoli celebrated the first peaceful transition of power in Libya's modern history.
The Assembly held its first meeting straight after the transition, and will continue meeting later to choose a speaker.
At the ceremony, Mr Jalil acknowledged the NTC's failures in restoring security in the country, but said that the NTC governed in "exceptional times".
Fighting continues in some parts of Libya and militia groups still hold a lot of power, the BBC's Rana Jawad in Tripoli says.
Candles for reconciliation
The transfer of power to Mohammed Ali Salim, the assembly's oldest member, took place late on Wednesday because of Ramadan - the Muslim month of fasting.
In Tripoli's Martyrs Square, hundreds of people held candles symbolising reconciliation, the Associated Press reports.
Fireworks also lit up the sky.
The 200-member assembly will later appoint a government, which will rule until new elections following the drafting of a new constitution.
The assembly was elected on 7 July in the country's first free and fair polls in decades and is a mixture of independent candidates and political parties.
Out of the 80 seats reserved for parties, the broadly secular National Forces Alliance, led by ex-interim Prime Minister Mahmoud Jibril - gained 39 seats, more than any other grouping.
On Monday, members of the assembly informally agreed on the need to select a head of the assembly and two deputy chiefs within a week, independent member Salah Jawooda told AFP news agency.
Former Libyan leader Col Muammar Gaddafi came to power in 1969 and ruled autocratically for more than four decades, until he was toppled and killed last year.
Prior to this year's polls, the last national vote was held in 1965, when no political parties were allowed.