"We are deeply concerned by the death and injury of many Libyans in recent clashes in Tripoli," US Secretary of State John Kerry said in a statement.
Fresh clashes erupted in a Tripoli suburb on Saturday, witnesses and the Libyan government said, as the death toll from violence at an anti-militia protest topped 40.
More than 400 people were also wounded when Friday's protest degenerated into armed clashes in the capital that continued through the night, Justice Minister Salah al-Marghani said.
"We condemn the use of violence in all its forms and urge all sides to exercise restraint and restore calm", John Kerry said on Saturday.
"Libyans did not risk their lives in their 2011 revolution for this violence to continue," the top US diplomat said, urging Libyans "to break the cycle of violence through respectful dialogue and reconciliation."
"We recognize that the Libyan authorities and Libyan people are facing significant challenges in their democratic transition, but too much blood has been spilled and too many lives sacrificed to go backwards," Kerry said, pledging continued US support.
Libya has seen a surge in unrest as former rebels who helped topple Moamer Kadhafi's regime have scoffed at government demands to lay down their arms.
The rebels were hailed as heroes following his ouster, but many have since carved out their own fiefdoms and been accused of mafia-like extortion and other crimes.
Earlier, Prime Minister Ali Zeidan appealed for "restraint and a halt to the clashes", warning the entry of more armed groups into the volatile capital could only "further complicate the situation."
On Friday, a demonstration calling for the Misrata militia made up of former rebel fighters to leave the capital turned into a deadly confrontation between rival gunmen.
The militias are holdovers from the 2011 uprising that ousted dictator Moamer Kadhafi and are a powerful force in the increasingly lawless North African country.