The U.N. said in a statement released on social media that the authorities should "prevent any actions that could lead to escalation and further violence."
Libya has had little peace since a 2011 NATO-backed uprising. The nation also split in 2014, with rival factions taking over different parts of the country.
Although major warfare has paused since a 2020 cease-fire, different groups still wield control over various government and security departments.
Flashes of conflict have repeatedly flared in Tripoli since 2020, with brief bursts of conflict between rival groups, sometimes linked to the country's wider political contest over ultimate control of government.
The Tripoli security directorate said the 10 people had been killed by "an unidentified armed group" late on Saturday night and included two members of the Stabilization Support Apparatus, one of the biggest and most prominent forces in Tripoli.
The SSA mourned two of its members in a Facebook post, saying they had been "struck by the hand of treachery" without giving further details of the incident.
The Tripoli security directorate said the public prosecution had already launched an investigation and all bodies had been handed over for forensic examination.
"This incident highlights concerns repeatedly raised by (the U.N. envoy to Libya) about the serious risks posed by rivalries between security actors that continue to threaten the fragile security in Tripoli," the U.N. mission said.
Diplomacy to resolve Libya's conflict has focused on holding elections to replace governing bodies that were last elected a decade or more ago, but political factions have not agreed on how a vote might take place.
Forum