The Western-backed governing coalition said it was aimed at increasing Iran's influence and restoring that of Syria.
At least 15 people have been killed in three days of clashes between government and opposition supporters. Fighting died down later on Friday.
Washington restated its backing for the government, saying that Hezbollah was killing innocent civilians.
Secretary of State Condoleezza Rice said the United States was committed to helping the government of Prime Minister Fouad Siniora.
"We will stand by the Lebanese government and peaceful citizens of Lebanon through this crisis and provide the support they need to weather this storm," she said in a statement.
The gunmen, who also back Hezbollah's Shia opposition allies, have forced the closure of pro-government media.
The opposition has said Hezbollah and its allies will maintain roadblocks around Beirut until there is a solution to the political crisis.
But the Lebanese army is now also on the streets protecting Saad Hariri, a Sunni leader of the governing coalition, and other leading figures who support the cabinet.
The fighting was sparked by a government move on Monday to shut down Hezbollah's telecoms network.
Civil war fears
Future TV News: Attacked by gunmen
Hariri residence: Fence hit by rocket-propelled grenade
Siniora office: Prime minister reportedly holed up with staff
Al-Mustaqbal: Newspaper office partially set on fire
Hamra Street: March by armed Shia militants
"The armed and bloody coup which is being implemented aims to return Syria to Lebanon and extend Iran's reach to the Mediterranean," the Lebanese government said in a statement, after holding an emergency session.
"Violence will not terrorise us, but it will increase our resolve," it said.
Mr Siniora was reportedly holed up with several ministers in his heavily guarded in central Beirut.
The Lebanese army did not intervene to stop Hezbollah fighters from seizing large swaths of western Beirut.
The UN Security Council has urged the rival parties to stop fighting amid fears of civil war breaking out.
Lebanon was plunged into civil war from 1975-90, drawing in Syria and Israel, the two regional powers.
Analysts say the key to avoiding such a conflict this time may be the neutrality of the army, and its ability to withstand the sectarian tensions.
Syrian President Bashar al-Assad, whose country long dominated Lebanon, said on Friday that the political crisis there was an "internal matter".
Having withdrawn its army from the country in 2005, Syria denies meddling in Lebanon's internal politics.
Lebanese army on the streets of Beirut
But Damascus has been accused of involvement in the assassination over the past three years of several anti-Syrians, including Rafik Hariri, a former prime minister.
Lebanon has been without a president since late 2007, amid deadlock between the ruling coalition and Hezbollah-led opposition over the make-up of the government.
Earlier, media offices owned by Saad Hariri were shut after being attacked by militants loyal to Hezbollah.
The army moved in after gunmen besieged TV station Future News and partially set fire to the offices of al-Mustaqbal newspaper. Mr Hariri's radio station was also silenced.
'Save Lebanon from hell'
A compromise was reached for the premises to be taken over and protected by the Lebanese army at the price of going off the air.
Several Sunni neighbourhoods in western Beirut, considered strongholds of Lebanon's ruling bloc, have reportedly been over-run by militants from Hezbollah and its Shia ally Amal.
A rocket-propelled grenade hit the fence of the heavily protected home of Mr Hariri in the Koreitem neighbourhood, officials said.
HAVE YOUR SAY I hope that a return to the catastrophic days of the 70's and 80's can be avoided Andy, UK
The urban warfare has shut down Lebanon's seaport and all but closed the international airport, with burning barricades on major roads in Beirut.
The BBC's Jim Muir in the city says it all amounts to a humiliating blow to the government.
It appears to have badly overplayed its hand in moving to close Hezbollah's telecoms network on Tuesday, he says.
Hezbollah leader Hassan Nasrallah has called the move a "declaration of war".
Mr Hariri said it was a "misunderstanding" and urged gunmen from
both sides to withdraw "to save Lebanon from hell".
Rival Lebanese leaders have agreed on steps to end the political deadlock that has led to the country's worst violence since the 1975-90 civil war.
The Western-backed government and the pro-Syrian opposition arrived at the deal after days of talks in Qatar.
Under the deal, the opposition - led by the Hezbollah political and militant group - will have the power of veto in a new cabinet of national unity.
It also paves the way for parliament to elect a new president.
The post has been empty since November.
Correspondents say the agreement is a major triumph for Hezbollah, whose key demands have been met.
In a speech at the ceremony in the Qatari capital Doha in which the deal was signed, Prime Minister Fouad Siniora said it was "an exceptional agreement at an exceptional time".
Telecommunications Minister Marwan Hamadeh said there were "no losers" under the deal.
Western-backed ruling majority to get 16 cabinet seats and choose prime minister
Syrian-backed opposition to get 11 cabinet seats and veto power
Three cabinet seats to be nominated by president
The use of weapons in internal conflicts is to be banned
Opposition protest camps in central Beirut are to be removed
New law to divide country into smaller electoral districts
Amr Moussa, head of the Arab League, which brokered the agreement, said it "releases Lebanon from its shackles".
Saad Hariri, a Sunni politician who leads the governing coalition, said the agreement opened "a new page for Lebanon".
Hezbollah delegation leader Mohammed Raad said it would help "towards strengthening coexistence and building the state".
The agreement gives the Hezbollah-led opposition bloc enough seats in the cabinet for a veto.
The controversial issue of Hezbollah's arsenal is addressed. The deal states that "use of arms or violence is forbidden to settle political differences".
Hezbollah, which is backed by Syria and Iran, has been refusing to give up any of its military capability, arguing that it is essential in the struggle against Israel.
Syrian Foreign Minister Walid Moualem told Reuters news agency that Damascus was "pleased that our brothers in Lebanon have reached an agreement".
The US also hailed the accord. David Welch, who is in charge of Middle Eastern affairs at the state department, called it "really a welcome development".
The agreement paves the way for parliament to elect army chief General Michel Suleiman as president, which officials say will happen on Sunday.
For months, Gen Suleiman has been accepted by all sides as the only candidate to succeed outgoing pro-Syrian President Emile Lahoud, but disagreements have repeatedly prevented a parliamentary vote to appoint him.
An opposition protest camp in central Beirut is also to be dismantled, in what Parliament Speaker Nabih Berri called a "gift" from the opposition.
Hezbollah members have already started to carry away mattresses from the encampment.
BBC diplomatic correspondent Jonathan Marcus says the Doha deal appears to have averted calamity by acknowledging a greater political role for Hezbollah.
He adds that some in the West, while applauding Lebanon's step back from the brink, may see this as a negative development.
Lebanon has been in political crisis since late 2006 when the opposition left a national unity coalition cabinet, demanding more power and a veto over government decisions.
The crisis turned violent two weeks ago when street battles between armed supporters of the factions left at least 65 people dead.
The clashes were triggered by government attempts to outlaw Hezbollah's private telephone network and reassign Beirut airport's security chief, who is close to the opposition.