Libya's western government hands power to unity team
Sarraj, who has led the UN-recognised GNA since it was set up in 2016, stepped down from the role in a ceremony in Tripoli, one day after the new interim Prime Minister Abdul Hamid Dbeibah and a three-member presidency council took the oath of office in parliament.
The new Government of National Unity (GNU), selected through a UN-supported process, is the latest internationally backed bid to end a decade of chaos in the North African nation and unite rival administrations.
Libya descended into conflict after dictator Moamer Gadaffi was toppled and killed in a NATO-backed uprising in 2011, with an array of forces battling to fill the void.
The new administration is hoped to replace both the GNA in Tripoli and a parallel cabinet headquartered in the east, under the de facto control of forces backing military strongman Khalifa Haftar.
Sarraj gave a brief speech in which he recalled the "endless difficulties" his government had faced.
Those included "the war on terrorism", the failed 2019 offensive by Haftar's forces to seize Tripoli, as well as "foreign interference".
Sarraj and the GNA had never won support of the eastern-based parliament.
A decade after Kadhafi was toppled, oil-rich Libya is divided between rival forces, with an estimated 20,000 mercenaries and foreign fighters still in the country.
In recent years, Turkey propped up the GNA, while Haftar's administration has drawn on support from the United Arab Emirates, Egypt and Russia.
"We are determined to continue the path of reform and everything you started," Dbeibah told Sarraj, before posing for photographs, while an orchestra played the national anthem.
Mohamed al-Manfi, who heads the presidency council, thanked the Sarraj government for "all that it was able to accomplish under difficult circumstances."
Dbeibah, a 61-year-old engineer and businessman, was selected on last month by a forum of 75 Libyan delegates at UN-led talks in Switzerland.
Last week parliament approved his choice of cabinet, a government he has said he hopes "will be the government of all Libyans".
Haftar last month offered "the support of the armed forces for the peace process".