(CNN) -- Libya's National Transitional Council handed over power Wednesday to the General National Congress, the national assembly formed by last month's elections.
The ceremony in a conference center in Tripoli marked the country's first peaceful government transition since before Moammar Gadhafi seized power in 1969.
Wednesday's event was held on the 20th day of Ramadan, a date chosen to mark the anniversary of the start of the liberation of the capital city from Gadhafi's grip.
NTC Chairman Mustafa Abdul Jalil and the oldest member of the body, Mohammed Ali Salim, signed documents marking the event. Jalil then walked to the microphone and announced that the NTC had handed over the "constitutional powers of running the country" and that the GNC was, from that moment, the "sole legitimate representative of the Libyan people."
As he spoke, the crowd rose to its feet and broke out in cheers, with some chanting "Allahu Akbar!" ("God is Great!") Others chanted a line that had become famous during the revolution: "The blood of martyrs will not go wasted!"
Many cried at the empowerment of the new assembly, which represents the country's first body formed in a free and fair election in more than 47 years.
Interim Prime Minister Abdul Rahim al-Kib appeared moved as he hugged Jalil.
The special representative of the secretary general of the United Nations to Libya, Ian Martin, smiled as Jalil announced the handover.
Members of the 200-person body took the oath of office en masse, and Jalil told them what they already knew: they face major challenges in security and disarmament.
Militias who helped oust Gadhafi continue to operate without government oversight, still hold thousands of detainees and continue to carry out arbitrary detentions.
On Sunday, unknown individuals attacked the residence of the International Committee of the Red Cross in Misrata. None of the seven staff members inside the building at the time of the attack was hurt, but the building suffered extensive damage, the ICRC said in a statement.
The attack marked the fifth in less than three months against the ICRC in Misrata and Benghazi and led Ishfaq Muhamed Khan, the head of the ICRC's delegation in Libya, to suspend operations in those two cities.
In addition, a bomb exploded Saturday in central Tripoli in what officials said was a local dispute.
And last week, a bomb exploded near a security headquarters building in Benghazi. Officials reported defusing two other bombs around that time, including one found in the basement of the Tibesti Hotel, which is frequented by government officials, foreign delegations and nationals.
It was not clear when the GNC's first official meeting would be held.
One of its first jobs will be to elect a speaker and deputies. It will have 30 days from its first official session to appoint a prime minister. It is also tasked with overseeing the drafting of a constitution.