A policeman killed the deadly clash after the country killed militia commanders.
Several ministers of Libya's internationally recognized government resigned in support of protesters' call for Prime Minister Abdul Hamid Dbeibah to step down.
The government said late Friday that a police officer was killed in a "attempt attack" in the prime minister's office, when thousands of Libyans marched into the squares and various areas of the capital Tripoli.
"He was shot and succumbed to his injuries by unknown assaulters," a statement said, adding that a group of people mingled with protesters tried to set fire to the office with Molotov cocktails.
Minister of Economy and Trade Mohamed Al-Hawij, Minister of Local Government Badr Eddin al-Tumi and Minister of Housing Abu Bakr al-Ghawi resigned.
The government earlier on Friday denied reports of the minister's resignation.
Meanwhile, in the city of Mislata, protesters gathered to support Dbeibah and his government.
The protests have killed at least eight civilians after waves of violence in Tripoli in the past week. The deadly conflict began, with powerful militia leader Abdelghani al-Kikli (also known as Giniva) killed in an ambush at a military base.
Dbeibah tried to consolidate power and claim control after the killings, and more clashes occurred later this week.
Prior to the demonstration, the UN support mission in Libya (UNSMIL) emphasized “citizens’ right to peaceful protest” and warned against “any escalation of violence.”
Al Jazeera's Malik Traina reported that Libyans want to see significant changes because people are "extremely frustrated" with the security situation.
"Libyans are calling for elections, hoping to be able to express their opinions and put the power they want in power," he said.
Cairo is closely monitoring Libya's development and urges all parties to exercise "maximum binding," the Egyptian Foreign Ministry said in a statement on Saturday. It also advises Egyptian citizens in Libya to remain cautious and stay at home until the situation is clarified.
Libya has been in turmoil since the 2011 NATO-backed uprising that ultimately divided the country between two rival governments.
Dbeibah's Government of National Unity (GNU) has maintained control over western Libya since 2021, while traitor military commander Khalifa Haftar led the government in the East.
Libya was scheduled to hold national elections at the end of 2021, and the election was postponed indefinitely due to rival government failure to reach an agreement on the framework due to candidate qualifications, constitutional rules and concerns about security.