Hezbollah on Saturday began withdrawing gunmen from Beirut and handed control of the streets to the Lebanese army, after days of gun battles with supporters of the U.S.-backed government.
Hezbollah, a political group backed by Iran and Syria with a guerrilla army, said it was ending its armed presence in Beirut after the army overturned government measures against the group.
Hezbollah seized control of much of the city on Friday after fighters loyal to the group routed gunmen loyal to the anti-Damascus governing coalition.
The Hezbollah-led opposition said it would maintain a "civil disobedience" campaign until its demands were met, but gave no further details. Lebanon has been in political deadlock for 17 months over opposition demands for a greater say in government.
Four days of fighting which has killed 37 people erupted after the government said it was taking action against Hezbollah's military communications network and sacked the head of security at Beirut airport, who is close to the Shiite group.
Hezbollah said the government had declared war by moving against the network, which played a crucial role in its 34-day war with Israel in 2006.
Prime Minister Fouad Siniora, whose legitimacy is disputed by the Hezbollah-led opposition, on Saturday handed responsibility for the moves against Hezbollah to the army, which has sought to avoid conflict with either side.
The army overturned them, saying it would handle the issue of the communications network in a way "that would not harm public interest and the security of the resistance".
It also said it was reinstating the head of airport security.
The army has mainly been seen as a neutral player in the political crisis between the governing coalition and an opposition alliance led by Hezbollah.
Governing coalition leader Saad al-Hariri, Lebanon's most powerful Sunni politician, said he welcomed the army's decision.
Much of the fighting has been between Shiite gunmen loyal to the opposition and Sunni supporters of Hariri.
Two soldiers and 17 gunmen died in clashes on Saturday east of Beirut and in north Lebanon. In the deadliest incident, security sources said at least 12 gunmen died when pro-government fighters stormed an office of a pro-Syrian opposition group in the village of Halba in north Lebanon.
Two people were killed in the capital on Saturday when shots were fired at the funeral of a government supporter in a continuation of the worst violence since the 1975-90 civil war.
At least 100 people have been wounded in recent days.
Hezbollah accused pro-government gunmen of Walid Jumblatt's Progressive Socialist Party of abducting three of its members and killing two of them. It said it held Jumblatt, a Druze leader, responsible for the safe return of the third.
Prime Minister Siniora said Beirut was "besieged" and "occupied". "What is Hezbollah doing in the alleyways of Beirut?" he said in a televised address. "Your state will not fall under the control of the putschists."
The fate of Hezbollah's arsenal has been at the heart of the power struggle between the opposition and the governing coalition.
"We ... can no longer accept Hezbollah's situation and that of its weapons as it is," Siniora said.
"Hezbollah must realize that force of arms will not scare us or make us retreat," he said. He reiterated a proposal already rejected by Hezbollah for resolving the crisis.
The United States, which considers Hezbollah a terrorist group, a threat to Israel, and a weapon in the hands of Iran, said on Friday it was talking with other powers about taking measures against "those responsible for the violence".
Hariri's supporters on Saturday still controlled areas in the north of the country where they have taken over several offices of opposition groups, and kept a key crossing point with Syria in the Bekaa Valley shut.
Hariri is a son of the late Prime Minister Rafik al-Hariri, whose assassination three years ago triggered pressure on Syria to withdraw troops from Lebanon.
The governing coalition accuses Hezbollah of seeking to restore Syria's influence. The group's show of military might is also alarming the West and its Sunni Arab allies who fear Iran's growing influence in the region.