The battles began when President Ali Abdullah Saleh's security forces attacked the home of Sheik Sadeq al-Ahmar, a former ally who had abandoned the president and joined the protesters calling for his ouster. Armed tribesmen fought back and seized control of the Hassaba neighborhood of the capital, Sanaa.
A tribal mediator said the sides agreed Saturday to withdraw their forces from the neighborhood starting Sunday morning.
An aid to al-Ahmar is confirming the deal.
Both spoke on condition of anonymity because they were not authorized to talk to the media.
Tribal sources and residents said there had been no renewal of fighting in Sana’s northern district of Hasaba, site of heavy clashes this week for control of government buildings, and outside the capital.
A prestigious think tank, the International Crisis Group, said a broad ceasefire was needed immediately and should be part of a plan that leads to a transition of power.
"To prevent further escalation and loss of life, the most urgent step is for both sides to immediately accept a ceasefire mediated by Yemen's statesmen and tribal leaders," it said in a "conflict risk alert" issued late on Friday.
Foreign states should be involved, it said, "but, given the deeply personal and tribal nature of the feud between the Salehs and al-Ahmars, it cannot be addressed effectively by international mediation or initiatives alone."
On Friday, Yemeni tribesmen said they had captured a military compound from elite troops loyal to the president 100 km (60 miles) outside Sana’a, widening a conflict hitherto concentrated mainly in the capital near the home of Mr. Ahmar.
Global powers have little sway in Yemen, where tribal allegiances are the most powerful element in a volatile social fabric and the fighting already appears to be playing out along tribal lines.
Few adversaries in Yemen have more resources than the 55-year-old Mr. Ahmar: a mix of warlord, tycoon and kingmaker.
He commands thousands of fighters from the Hashid tribal confederation with arsenals that include rocket-propelled grenades and mortars - and can likely summon more. Many of his nine brothers have played prominent roles in Yemeni politics and commerce. One owns a phone company, a bank, a TV network and franchises for the fast-food chain KFC and the Western-style Spinneys supermarkets.
But the essence of Mr. Ahmar's power is as a political godfather. At one time, it helped prop up Mr. Saleh's rule.
Mr. Ahmar took over as the head of the Hashid after his father, Abdullah, died in 2007. In effect, it's like running a state within a state. The Hashid confederation has hundreds of thousands of people under its umbrella of nine tribes - including Mr. Saleh's own, the Sanhan. Many of the Sanhan's members have turned against the president since the uprising began in February.
But Mr. Ahmar also inherited an alliance with Mr. Saleh. His father was parliament speaker for 10 years and led the Islah Islamic party, an opposition bloc dominated by tribal sheiks and Islamists that did not directly threaten Saleh's regime.
Now the fighting between Mr. Al Ahmar and Mr. Saleh has overshadowed a largely peaceful protest movement that started months ago aimed at ending Mr. Saleh's 33-year-long autocratic rule and inspired by the movements that brought down the long-standing leaders of Tunisia and Egypt.
"Urban youth and civil society activists, who initiated the protest movement, stand to lose the most from this turn of events," the ICG report said.
Mediators have become exasperated with Mr. Saleh, saying he had repeatedly imposed new conditions each time a Gulf-led transition agreement was due for signing, most recently demanding a public signing ceremony.
Machinegun fire and explosions rattled Sana’a this week before clashes eased after mediation efforts. Mr. Ahmar's fighters evacuated government ministry buildings they had grabbed in return for a ceasefire and troops quitting their area.
The ceasefire applies to an area around the Mr. Ahmar compound in Sana’a -- a city now split between the two sides.
There was also an informal truce in place in a region northeast of Sana’a where tribes said on Friday said they had seized a military post.
Yemeni air force fighters had strafed those tribal fighters with bombs and broke the sound barrier in flights over Sana’a.
There are worries that impoverished Yemen, where some 40 percent of the country's 23 million people live on less than $2 a day, could become a failed state located on a shipping lane through which 3 million barrels of oil pass daily.
In the south, dozens of armed men believed to be from Al Qaeda appeared to have full control of city of Zinjibar in the flashpoint province of Abyan on Saturday, a day after storming the city and chasing out security forces, residents said.
The United States and Saudi Arabia, both targets of foiled attacks by the Yemen wing of Al Qaeda, are concerned any spread of anarchy could embolden the militant group.
With the political strife, the Yemen-based Al Qaeda in the Arabian Peninsula (AQAP) is likely to have more freedom to use a proven talent for daring bombing plots, analysts said.
"Given how distracted Saleh's government is in its attempts to cling to power, AQAP has much more open space in which to operate at the moment," said Yemen scholar Gregory Johnsen.
(Sara Ghasemilee, an editor at Al Arabiya, can be reached at email@example.com)