A vehicle was on fire on the road near the embassy compound’s perimeter and police sealed off the area, witnesses said.
Roads leading to the embassy were closed after the attack.
Mohammed al-Qadi, a political columnist for the Yemen Times, told Al Jazeera: “The attack came at about 9.30 in the morning, when there were not so many people passing in the streets outside the US embassy.
“Otherwise, the casualties could have been a lot more.”
Washington accused al-Qaeda of being behind the attack.
“I think it is safe to say … the attacks bear all the hallmarks of an al-Qaeda attack,” Sean McCormack, the US state department spokesman, said.
George Bush, the US president, said the attack was a bid by extremists to drive the United States out of regions like the Middle East.
“This attack is a reminder that we are at war with extremists who would murder innocent people to achieve their ideological objectives,” Bush said as he met with General David Petraeus, the former top US commander in Iraq.
“One objective of these extremists as they kill is to try to cause the United States to lose our nerve and to withdraw from regions of the world, and our message is – is that we want to help governments survive the extremists, we want people to live normal lives,” Bush said.
The US state department had in April ordered all non-essential diplomatic staff to leave the country after an attack on the embassy the previous month.
A residential compound used by US oil workers in Sanaa had also come under attack from rockets at that time.
The embassy called on Americans in Yemen to “exercise caution and take prudent security measures, including maintaining a high level of vigilance, avoiding crowds and demonstrations, keeping a low profile, varying times and routes for all travel”.
There have been several attacks by fighters in Yemen in recent years.