Libya's first elected assembly picked Mohammed Magarief, leader of the National Front party, as its president.
The elected assembly has taken power from the National Transitional Council, which has ruled the country since last year's uprising against Muammar Gaddafi.
Magarief, a long-time opponent of ousted leader Muammar Gaddafi, will head the 200-member congress.
It will name a prime minister, pass laws and steer Libya to full parliamentary elections after a new constitution is drafted next year.
The national assembly began life last night following a late-night handover ceremony, the first peaceful transition of power in Libya's modern history.
Mustafa Abdul-Jalil, head of the outgoing NTC, gave a conciliatory speech before dissolving his council and transferring power to the new assembly.
He acknowledged the NTC's failures in restoring security, but said that the council ruled in "exceptional times".
Fireworks lit the sky as Libyans celebrated the transfer of power while breaking their daily fast for the Muslim holy month of Ramadan.