A gunman opened fire outside the U.S. Embassy early Tuesday, but was shot by Yemeni security guards and arrested before anyone else was wounded, an Interior Ministry official said.

The gunman, who was armed with a Kalashnikov assault rifle, seemed to be acting alone and he did not breach the security around the embassy, the official said, speaking on condition of anonymity, as he was not authorized to speak to the media.

The gunman was being questioned at a hospital, the official said. Yemen immediately increased security outside the embassy.

Many embassies in the capital, San'a, went on alert this week after they received information that an unspecified terrorist attack was imminent, Yemeni security officials said.

Al Qaeda has carried out a number of major attacks in Yemen in recent years, including the bombing of the destroyer USS Cole in 2000, which killed 17 U.S. sailors. Usama bin Laden is of Yemeni origin.

The Yemeni government supports the U.S. campaign against international terrorism and has received U.S. military aid. But its crackdown on militants has suffered a number of reverses, such as the February prison breakout of 23 convicts — some of whom had been jailed for Al Qaeda-linked crimes.