SANAA (Reuters) - As fighting raged at the First Armored Division's base in central Sanaa, General Ali Mohsen al-Ahmar arrived in a motorcade at the general staff headquarters and entered the building shouting "Treason! Treason!".
He grabbed some documents from a desk and left in a hurry, a defense ministry official said. Half an hour later, the commander of the Fourth Brigade Presidential Security turned up, collected his car and sped away.
"I knew then that Sanaa had fallen and that it was over," the officer, who asked not to be named, told Reuters.
"General al-Ahmar was angry and felt utterly betrayed."
While many details of the surrender of Yemen's capital by 100,000 Republican Guards to some 5,000 Houthi fighters on Sept. 21 remain murky, the nature of the capitulation bodes ill for President Abd Rabbu Mansour Hadi's fragile grip on power.
Home to an al Qaeda branch held responsible by Washington for three attempted bombings of aircraft in the United States, Yemen is close to becoming a failed state, thanks in part to covert maneuvering from its own ousted ruler and Iran.
Corruption, internal splits and competing loyalties in the army began before former President Ali Abdullah Saleh was ousted by protests in 2011 and are now reaching a critical stage.
Those ailments are partly based on the country's patchwork tribal, sectarian and regional splits, but also on a history of wrangling between powerful political players that came to a head during the Arab spring.
"What happened was not the result of Hadi's mismanagement, but as a result of undermining the essence of the Yemeni state during Saleh's rule over the past 20 years," Yemeni analyst Abdelghani al-Iryani said, referring to the fall of Sanaa.
"The Yemeni state is now at risk of unraveling and falling."
Saleh created a rival power base when he put General Ahmar, a close ally of the Sunni Islamist Islah party, Yemen's Muslim Brotherhood branch, in charge of his 2004-10 crackdown on the Shi'ite Muslim militias Houthi militias who now dominate Yemen.
When mass protests broke out in 2011, Ahmar's forces sided with the protesters, including Islah supporters, and clashed with army units loyal to Saleh, who was forced to step down in favor of his deputy Hadi, who had no power base of his own.
Hadi tried to reunite the army in 2012, removing Ahmar from the First Armoured Brigade's command and appointing him as a military adviser. But at the rank-and-file level, the Brigade stayed loyal to its old leader, while many other divisions retained ties to former president Saleh, insiders said.
The Houthis emerged early last decade demanding more rights for the fifth of Yemenis who follow Shi'ite Islam' Zaydi branch. They have since cast themselves as a national revolutionary movement, and have fought the army six times from 2004-10.
Analysts say two developments helped their rise to power: A tactical alliance with Saleh and a more strategic tie-up with Shi'ite power Iran.
The Houthis have sought to replicate the strategy of Iran's Lebanese ally, Hezbollah, using popular support among Zaydis combined with a muscular military presence to dominate politics.
Iran denies interference in Yemeni politics. But an Iranian official told Reuters Tehran had "always backed the Houthis".
As the Houthis began their drive southwards from their power base in Yemen's far north last year, they mostly fought army brigades and tribal fighters loyal to Ahmar and Islah, while the rest of the army remained reluctant to join in.
"When these forces are despatched to fight al Qaeda in the south, they fight valiantly. But the tribal affiliation takes precedence when they are sent to fight at home," an advisor to Hadi told Reuters.
He said the army had repeatedly refused to fight the Houthis, first in July when the president ordered reinforcements to forces in the northern city of Amran battling the militia.
He attributed their reluctance to regional and tribal loyalties, but politics may have played a part too.
Yemeni officials say Saleh, known for political maneuvering skills that he once compared to dancing on the heads of snakes, had intended to get rid of Islamists he views as being responsible for his downfall after 33 years in office.
According to a U.S. government document seen by Reuters, Saleh "had reportedly become one of the primary supporters of the Houthi rebellion" in the hope that instability would allow him to regain power via a coup.
Soldiers and officers loyal to Saleh and discharged by Hadi's army restructuring since 2012 joined the 'popular committees' set up by the Houthis to capture Sanaa and keep order in the city, Yemeni officials said.
Fighting during the 2011 uprising between army units loyal to Saleh, and those loyal to Ahmar, had also played a part.
"How can one expect us to come to their aid, even against the Houthis?" said Shayef Mohammed, a Republican Guards officer whose army camp had been besieged by Ahmar's First Armoured Brigade.
The Houthis argue that Yemeni army and security forces, fed up with corruption and mismanagement, have chosen to be neutral.
An aide to Hadi, speaking on condition of anonymity, said officers in charge of special forces guarding southern Sanaa had forced their commander to sign a non-aggression pact with the Houthi field commander on the eve of the battle for the capital.
Hadi ultimately decided that an attempt to block the Houthis would risk a wider catastrophe, the aide said, comparing the president's task to that of the pilot of a hijacked airplane.
"It doesn't make sense to abandon the cockpit and go to quarrel with the hijackers, even if they kill some of the passengers," he said.
Additional reporting and writing by Sami Aboudi; editing by Angus McDowall and Philippa Fletcher