Libya's National Transitional Council on Wednesday handed power to a new assembly in a symbolic move marking a peaceful transition following the overthrow of Moamer Kadhafi's 40-year dictatorship.
"I hand over the constitutional prerogatives to the General National Congress, which from now on is the legitimate representative of the Libyan people," NTC chief Mustafa Abdel Jalil said.
Libya's interim leader passed the reins to the oldest member of the 200-seat legislative assembly elected on July 7 at a ceremony that was scheduled late in the day because of Ramadan, the Muslim holy month of fasting from dawn to dusk.
Minutes earlier the 200 congress members were sworn in by the president of Libya's Supreme Court.
"The NTC no longer exists. It has been dissolved," council member Othman Ben Sassi told AFP.
The NTC chief welcomed what he said was "the first handover of power in Libya's history" as a "historic moment" for all Libyans.
But he admitted that "mistakes" had been made during an "extraordinary" transition period and said security and disarmament issues had not been resolved in time.
He said the NTC had also failed to find a solution to the refugee crisis, which he said was a "real tragedy".
"We were unable to guarantee the security as we would have wished and as the Libyan people would have wished," he said.
Libya's interim leader Abdel Jalil announced that he would retire and quit his posts as NTC chief and in the country's top panel of magistrates, of which he had been a member since the days of Kadhafi.
A conference room was arranged in an upscale hotel in the Libyan capital as a makeshift venue for the assembly, which is due to begin its work a week from now, according to the official LANA news agency.
The authorities put in place tight security measures for the 40-minute ceremony, in view of the ongoing violence in Benghazi and in the capital, where a car exploded during a marketplace gunbattle on Saturday.
The interior ministry said it cordoned off the hotel and that "all the roads near or leading to the conference will be closed" until early Thursday.
Signup to our newsletter and follow us on Facebook and Twitter!
"We must elect a president tonight or tomorrow to avoid a constitutional void," a congress member told AFP.
Representatives of civil society groups and diplomatic missions in Libya, as well as NTC and government officials, attended the ceremony.
The General National Congress, the outcome of last month's ballot, will be tasked with choosing a new interim government to take over from the NTC, and will steer the country until fresh elections can be held, based on a new constitution to be drafted by a constituent authority of 60 members.
Assembly members, who had been converging on Tripoli since Sunday, held an informal meeting on Monday and agreed on the need to select a head of the GNC and two deputy chiefs within a week, according to Salah Jawooda, an independent member from the eastern city of Benghazi.
A committee will also be chosen to write its internal procedural rules.
Libyans elected a legislative assembly of party and independent representatives last month, in their first free vote since a popular uprising last year escalated into a civil war that ousted the now-slain Kadhafi.
Of the 200 assembly members, the lion's share of seats has been set aside for individual candidates whose loyalties and ideologies remain unclear but who are being wooed by various blocs.
Out of the parties, which hold 80 of the 200 seats, the liberal coalition of 2011 wartime premier Mahmud Jibril performed best, securing 39 seats on its own.
Jibril's National Forces Alliance also counts on the support of a centrist party led by Ali Tarhuni, who held several key posts during last year's revolt. It obtained two seats in the congress.
The Justice and Construction Party, launched by Libya's Muslim Brotherhood, came in second with 17 seats. But its leader, Mohammed Sawan, says the party can even the score by bringing independent candidates to its side.
Whether two or three major forces emerge in the congress, decisions in the assembly require a two-thirds majority to pass, making cooperation necessary to avoid gridlock in the delicate transition.
Jawooda dismissed suggestions that a new government could be in place before the Eid al-Fitr festival that follows Ramadan, which is due to conclude in around 10 days.
"It is premature to discuss this now," he told AFP.
The NTC was the political arm of the rebellion that toppled Kadhafi, and officially assumed power after the regime was overthrown.
It presided over a transition period marked by high levels of insecurity after its failure to integrate or disarm the ex-rebel militias who helped oust Kadhafi.