Yemen military officials say suicide attackers have killed nine soldiers in an assault on a base near the country's southern coast.

The attack took place in the city of Shakra in Abyan province when four suspected al-Qaida gunmen in a vehicle stormed the military base's main gate and entered after a skirmish with guards.

A military police commander was among those killed in the attack, as well as all four attackers, the officials said, speaking on condition of anonymity in line with military regulations.

Abyan was once an al-Qaida stronghold until government troops swept through in an offensive earlier this year. The U.S. has been helping the country in its efforts against the group, considering the Yemen branch the most dangerous of its offshoots.