At least two people were killed in fighting between militias outside Libya's capital Tripoli, troops in the area said on Friday, in a sign that armed groups are vying for power in the absence of a unified army.

At a makeshift road checkpoint 30km (19 miles) west of Tripoli, fighters from the coastal town of Zawiyah told Reuters clashes erupted overnight after a rival militia set up roadblocks, started confiscating their weapons and smashing cars.

Fighters who helped overthrow Libyan strongman Muammar Gaddafi in a eight-month uprising have since set up roadblocks across the country, saying they are guarding oil facilities and providing security.

Three weeks since the National Transitional Council (NTC) declared Libya liberated, analysts are warning that violence might erupt as armed factions struggle for influence.

We came 10km from Zawiyah to protect the area, said fighter Morad Ali, sitting in his pickup truck with a rocket launcher fixed to the back.

Members of the Wershifanna tribe kidnapped fighters from Zawiyah, he said, adding that heavy machine guns and rocket-propelled grenades were used in the battle that lasted through the night and into the morning.

Fighters from Zawiyah at the roadblock in the rural area of Imaya accused the Wershifanna of supporting Muammar Gaddafi and of setting out to seek revenge.

Fighters from Bani Walid, one of Gaddafi's last bastions, have also moved into the area, they added.

The Wershifanna say they are rebels, but they are not rebels. We found Gaddafi's green flag around the area, Ali said. A Reuters team found torn rags of the green flags along roads nearby but could not confirm who placed them there.

Zawiyah Militiamen said they were preparing to free their kidnapped colleagues from the armed Wershifanna fighters hiding in the area. Elders from both sides were first trying to negotiate a compromise, they added.

The council of elders is speaking. If they don't agree, we'll go in, a militiaman said. Fighting had not resumed by Friday night.

About 100 fighters from Zawiyah, many of them firing into the air as a show of force, gathered under a bridge during ther day checking cars for weapons and making arrests.

NO TIMETABLE FOR ARMY FORMATION

Libya's incoming prime minister Abdurrahim El-Keib has promised to disarm militias and set up a national army, but has yet to announce a concrete timetable or form a government.

It is not an issue of just saying 'OK, just give us your gun, go home.' This is not the approach we take, Keib told Reuters on Wednesday.

We will look at the issues, evaluate and come up with programmes to take care of them and help them and make them feel important, he added.

Abdel Hakim Belhadj, the head of the NTC's Military Council, told Reuters on Friday that the fighting was an isolated incident.

It is a sad situation that took place between two groups ... an old feud that was renewed. And today we will work on establishing a peacemaking committee between the two tribes, and we hope they will have success