Libyan troops struggling to establish control across the country clashed with militants in the eastern city of Benghazi on Monday and at least nine people were killed in the fighting, according to city officials.
Still in training, Libya's new military faces a challenge from Islamist militants and militias who fought in the uprising against Muammar Gaddafi but refuse to disarm and control parts of the country.
Gunfire and explosions could be heard in Benghazi and thick smoke rose from the Ras Obeida area. The army ordered residents to stay off the city streets and recalled troops on leave to their units in the city.
Fighting broke out when an army special forces unit pursued a suspect into an area where Islamist militant group Ansar al-Sharia operates its own checkpoints, Benghazi city security officials said.
At least nine people were killed and 49 wounded in the gun battles, the Tripoli government said in a statement.
"The government urges the people of Benghazi to exercise calm until the security forces can provide security," the statement said.
Ansar al-Sharia was blamed for the attack on the U.S. consulate in Benghazi a year ago when the U.S. ambassador and three other Americans were killed.
The chaos in Libya is worrying its neighbours and the Western powers who backed the uprising that led to the fall of Gaddafi two years ago.
Prime Minister Ali Zeidan, who was briefly abducted by a militia last month, met U.S. Secretary of State John Kerry and British Foreign Secretary William Hague in London on Sunday to discuss cooperation.
Rival militia groups withdrew from Tripoli last week after clashes killed more than 40 people during a march to one of the militia bases to demand they leave the capital city.
Hoping to co-opt former fighters, the government hired militia groups to provide security. But they remain loyal to their commanders or tribes, and often clash in disputes over territory or personal feuds.
The U.S. military, Britain, France, NATO and Turkey have all promised aid for the OPEC country's armed forces. But most of the programmes are just beginning and the military is still no match for the armed groups.