Militants set off a large car bomb outside a security headquarters in Yemen's southern port city of Aden early Sunday before storming the compound and placing snipers on the roof, officials said, adding that at least five Yemeni soldiers were killed.

A Saudi-led coalition meanwhile launched a wave of overnight airstrikes on the rebel-held capital, Sanaa, apparently in response to a ballistic missile fired by the rebels toward an international airport on the outskirts of Riyadh, the Saudi capital. Saudi Arabia said it shot down the missile before it hit its target, with fragments landing in an uninhabited area north of the capital.

Speaking on condition of anonymity because they were not authorized to brief reporters, the security officials said the militants had taken an unknown number of people prisoner inside the compound in Aden. They said Shallal al-Shayae, the security chief, was not inside the compound at the time of the attack.

Witnesses said at least four militant snipers could be seen on the roof of the compound. It was not immediately clear who was behind the attack or if they had made any demands. The complex attack bore the hallmarks of the country's powerful al-Qaida affiliate. Yemen is also home to an offshoot of the Islamic State group.

The country is embroiled in a war between Iran-backed Shiite rebels, known as Houthis, and the internationally recognized government, which is allied with a Saudi-led military coalition. The government has been based in Saudi Arabia since the Houthis overran Sanaa in 2014. Government forces ostensibly control Aden, but the city remains volatile.

The Houthis said in a statement that the missile was launched in response to bombings that have killed civilians. The Houthis have fired a number of missiles across the border in recent years, but this was the first time one landed near a populated area, and it appeared to be the deepest strike yet within Saudi territory.

Riyadh is around 620 miles (1,000 kilometers) north of the border with Yemen.

Saudi-led airstrikes in Yemen have killed and wounded thousands of civilians, hitting houses, busy markets, hospitals and schools in what rights groups have said amounts to war crimes. Houthi artillery has also killed large numbers of civilians. The war has claimed more than 10,000 lives and driven the Arab world's poorest country to the brink of famine.