By Peter Salisbury
SANAA, Dec 5 (Reuters) - Bab al Yemen, the gateway to Sanaa's Old City, normally bustles with activity in the late afternoon, a riot of trade and raucous chatter.
But it was tense and largely empty on Thursday evening, a vehicle mounted with a machine gun sealing off its arched entrance after more than 20 people were killed nearby in one of Yemen's worst attacks for 18 months.
A car bomber and gunmen dressed as Yemeni soldiers had assaulted a Defence Ministry compound near Bab al-Yemen, battling security forces and executing foreign medical staff, according to medical sources in the compound.
No group has claimed responsibility for the attack yet, but analysts say it carries the hallmark of al Qaeda in the Arabian Peninsula (AQAP), which in July 2012 killed more than 90 people at a rehearsal for a military parade in Sanaa.
"I have never seen anything like this in the Old City," said Ibrahim, who lives in the Bab Rajraj quarter, which opens out on to the large square next to Bab al Yemen.
"I felt scared for my mother and my sisters. What if they come again in two, or three days?" he added.
The Old City, something of a tourist attraction in calmer times, was an area of relative calm even during the 2011 uprising which prompted fighting between army factions and led to the downfall of veteran leader Ali Abdullah Saleh.
On Thursday the historic quarter woke to chaos, however, shaken by a huge explosion followed soon after by the insistent rattle of gunfire.
By late afternoon, intermittent bursts could still be heard, but security forces said they had recaptured the compound, killing all but two of the attackers, allowing interim President Abd-Rabbu Mansour Hadi to tour it.
The president later met top military officials and ordered an investigation into the attack.
"I was at home asleep with my wife and kids," said Khaled, who lives in the Sharib quarter of the Old City, the wall of which runs parallel to the Ministry of Defence building.
"The explosion woke us all up and broke all the windows of the house. The fighting went on for hours," he added.
Glass littered the streets even half a kilometre away from the site of the blast, where women carefully cleared shards from their windowpanes.
It was the deadliest attack in Sanaa since a July 2012 bombing, although there have been worse incidents elsewhere in the country.
The bombing also came just four days into a citywide ban on motorcycles aimed at curbing a recent spate of assassinations.
Indeed, rather than improve, security has declined, leading many in the capital to fear that the violence that has become commonplace in other provinces may now have reached Sanaa.
AQAP and allied Islamist militants have staged an insurgency in southern Yemen for the past two years, killing hundreds of soldiers despite a government offensive and drone strikes by the United States.
Yemen also faces fighting between members of the Shi'ite Houthi movement and other groups in its northern highlands.
The assault on the country's most important security institution, which happened while defence minister Major General Mohammed Nasser Ahmed was abroad, was a message to Yemenis, said Samaa al-Hamdani, a Yemeni political analyst.
"It was obvious a long time ago that security had deteriorated seriously, so that people knew they couldn't rely on the government," Hamdani said.
"(The attack) was aimed at abolishing the trust between the Yemeni people and the government," she added.
But even in the comparatively peaceful Old City, Yemenis have grown inured to the lack of security. Just beyond the main square at Bab al-Yemen, some shops had reopened by Thursday evening.
One business was doing particularly well. At a stall opposite the Grand Mosque, another Old City landmark, Ayman, who sells ornate windows, was doing a brisk trade.
"Lots of people have already come looking for glass to replace their broken windows," he said.
Hamdani was less sanguine. "AQAP has been getting stronger and stronger, and this was their way of saying 'I'm here'," she said. "There is definitely more to come." (Editing by Angus McDowall and Hugh Lawson)