Friday's incident that left two people dead near Tripoli was the latest in a series of confrontations between former fighters since they brought down Moammar Gaddafi's regime last month, following an eight-month civil war.
Libya's interim prime minister, Abdurrahim el-Keib, has said it would be difficult to disarm the fighters before they can be offered alternatives to militia membership, such as training or jobs in security services that have yet to be established.
However, public anger against the former revolutionaries has been rising, particularly in Tripoli. Hundreds of fighters from other parts of the country are still encamped in prime locations in the city.
Friday's violence erupted about midway between Tripoli and the seaside city of Zawiya, about 50 kilometers (30 miles) to the west. Anwar al-Bishti, a local militia commander from Zawiya, said it began with a dispute between fighters from his city and another armed group, the Warshefana Brigade, named after a town in the area.
Zawiya fighters seized weapons from a man in Warshefana on Thursday, al-Bishti said. In retaliation, Warshefana fighters set up an impromptu roadblock on the road between Tripoli and Zawiya on Friday and harassed motorists, pulled people out of their cars, and fired at random.
Two Zawiya residents were killed by gunfire, said al-Bishti.
On Saturday, cars carrying gunmen were gathering at a checkpoint midway between Tripoli and Zawiya. Al-Bishti said the plan was to try to disarm the Warshefana Brigade, one of hundreds of bands of fighters formed by civilians during the uprising against Gaddafi.