At least 41 people have been killed in shelling and street battles between government forces and opposition fighters in the Yemeni capital of Sana'a.

The skirmishes come amid growing signs of disarray in president Ali Abdullah Saleh's military.

Fighting raged until 5am, and witnesses said presidential guard units shelled the headquarters of an army brigade responsible for guarding sensitive government institutions.

Army officers who have defected to the opposition say the government suspected the brigade commander was about to join forces with the movement to oust Saleh.

Opposition army officers, speaking on condition of anonymity in line with army rules, said the armoured brigade commander, Brigadier General Mohammed Khalil, was neutral and without political affiliation but had apparently angered Saleh.

The dead included combatants from both sides of the conflict, said the medical officials, speaking anonymously for fear of reprisals.

The fighting engulfed the Hassaba neighbourhood that contains the family compound of influential opposition tribal leader Sheik Sadeq al-Ahmar, and to the north of that district where republican guard units protect Saleh's former residence.

The units, led by one of Saleh's sons, and special forces wearing uniforms of government security troops attacked but failed to recapture the Hassaba administrative building from tribal gunmen.

On Tuesday, Saleh imposed collective punishment on the Hassaba neighbourhood by cutting water supplies and electricity.

A resident who lives close to the fighting and would only give his first name, Zaher, said columns of smoke and fire billowed from Khalil's brigade headquarters and explosions could be heard.

Several ambulances were seen ferrying injured people to the al-Gomhuria general hospital, Zaher said.

Al-Ahmar tribesmen were seen on Wednesday morning around the office of the prosecutor general in the Shamlan neighbourhood, west of the capital.

They were accompanied by two armoured vehicles from the 1st armoured division which defected to the opposition two months ago.

There was also fighting for the first time in the Hada neighbourhood, a stronghold for Saleh supporters in the south of the capital.

The interior ministry said in a statement that tribesmen had taken over a five storey building there after clashing with the army.