The State Department said U.S. Embassy officials in Yemen had concluded that the attack was "directed against our embassy." U.S. officials refused to comment further, saying it was still under investigation.
The embassy issued a statement in Arabic saying none of its employees was wounded, adding that "we pray for the victims and their families." The embassy closed for the rest of the day.
A statement from the Interior Ministry said the shells fired by unidentified attackers in the downtown San'a district of Sawan wounded five soldiers and 13 school girls. Three of the girls were described as in serious condition and were being flown to Jordan for treatment.
The statement did not mention the death of the guard, which was reported by a ministry official who spoke on condition of anonymity because he was not authorized to talk to the press.
"The ministry will arrest those terrorists as fast as it can and bring them to justice," the ministry statement said.
Troops sealed off roads and prevented journalists from approaching the school, which is attended mostly by Yemeni students.
The U.S. Embassy in Yemen, which is the ancestral homeland of al Qaeda leader Osama bin Laden, has been the focus of violence before.
In March 2002, a Yemeni man lobbed a sound grenade into the embassy grounds a day after Vice President Dick Cheney made a stop for talks with officials at the San'a airport. The attacker, who allegedly sought to retaliate against what he called American bias toward Israel, was sentenced to 10 years in prison but the sentence was later reduced to seven years.
In March 2003, two people were fatally shot and dozens more were injured as police clashed with demonstrators trying to storm the embassy when tens of thousands rallied against U.S.-led invasion of Iraq.
In 2006, a gunman opened fire outside the embassy but was shot and arrested by Yemeni guards. The gunman, armed with a Kalashnikov rifle, claimed he wanted to kill Americans.
Al Qaeda has an active presence in Yemen despite government efforts to destroy it. The group was blamed for the 2000 bombing of the USS Cole destroyer in the Yemeni port of Aden that killed 17 American sailors and an attack on a French oil tanker that killed one person two years later.
Also Tuesday, a security official said three soldiers were wounded in an explosion at a police station in Yemen's Abyan province. The building had been attacked in November by al Qaeda members seeking to free others detained there.