SAN'A, Yemen - Security forces and opposition tribal fighters battled with automatic weapons, mortars, and tanks in the Yemeni capital Monday, blasting buildings and setting government offices on fire in violence that increased fears of an armed confrontation after the collapse of efforts to negotiate a peaceful exit for President Ali Abdullah Saleh.

The street fighting, in which six people were killed and nearly 40 hurt, was the heaviest clash between pro- and anti-Saleh camps since hundreds of thousands of began taking to the streets three months ago, demanding the president's ouster after 32 years in power.

It erupted amid increased tensions after Saleh refused at the last minute Sunday to sign a U.S.-backed agreement, mediated by Yemen's powerful gulf Arab neighbors, under which he would step down in 30 days.

Saleh had promised to sign the deal, but instead, his regime sent mobs of armed supporters into the streets Sunday, protesting at embassies, in an orchestrated campaign to demand he stay in power. It was the third time he had refused to sign the accord.

The United States expressed growing frustration with Saleh, an ally that Washington has relied on to fight al-Qaeda's branch in the impoverished nation at the southern tip of the Arabian Peninsula. Fearing the turmoil is disrupting the campaign against the terror group, Washington has been trying to manage a transition that will keep some measure of stability.

So far, both sides in Yemen's turmoil have tried to avoid direct armed confrontation. The protesters are backed by heavily armed tribes and army units that defected to the opposition, while Saleh has clung to power by retaining the loyalty of the country's military and security forces. His forces have cracked down on protesters, killing at least 150.

But Monday's fighting underlined how explosive the tensions could be. The violence erupted outside the San'a home of Sheikh Sadeq al-Ahmar, leader of Yemen's largest, most powerful tribe, the Hashid. Saleh himself belongs to the tribe, but Ahmar announced in March that the Hashid were joining the popular uprising against the president. Fighting raged for more than six hours, until the U.S. ambassador mediated a cease-fire, according to a ruling-party official.

Saleh and the opposition have traded accusations that each is leading the country into civil war. But the beleaguered president faces increasing impatience from the United States after his last-minute balking at the accord for the third time Sunday.