At least five soldiers were killed in Yemen's southern port city of Aden after militants set off a large car bomb outside a security headquarters on early Sunday.
The militants then stormed the security building and placed snipers on the roof, according to officials.
Meanwhile, a Saudi-led coalition launched a wave of airstrikes overnight on the rebel-held capital Sanaa, in response to a ballistic missile by fired by the rebels toward an international airport on the outskirts of the Saudi capital, Riyadh.
Saudi Arabia said the missile was shot down before it hit its target, with its fragments landing in an uninhabited region in the capital.
Soon after the missile launch, the Houthis released a statement saying the missile was launched in response to the Saudi-led bombings which have killed many civilians.
The Yemen security officials, on condition of anonymity, were quoted by Associated Press as saying that the militants had taken an unknown number of people prisoners inside the compound in Aden.
The officials said the security chief, Shallal al-Shayae, was not inside the compound at the time of the attack. Reports state that at least four militant snipers could be seen on the roof of the compound.
It is not yet clear who is behind the attack and what their demands are, if any. Yemen is home to an offshoot of the extremist Islamic State (ISIS) group.
Yemen is currently battling a war between the Shiite rebels backed by Iran, known as Houthis, and the internationally recognised government, which is allied with a military coalition led by Saudi Arabia.
Ever since the Houthis overran Sanaa in 2014, the Yemen government has been functioning from Saudi Arabia.