SANAA - A US soldier was freed Tuesday by Yemeni forces just hours after being captured in an Al-Qaeda attack on an air base in the violence-wracked country, military officials said.

The American was seized along with seven Yemeni soldiers in the militant assault on Al-Anad base in Lahij province, an official said.

Yemeni forces launched a dawn raid to free the hostages, killing seven kidnappers.

One member of the security forces was reported to have been lightly wounded during the rescue.

The militants captured seven soldiers on guard during the night before advancing into the base and seizing the US soldier, the official said.

Yemen is a key US ally in the fight against Al-Qaeda, allowing Washington to conduct a longstanding drone war against the group on its territory.

Yemeni officials acknowledge that Washington has deployed personnel at Al-Anad base to gather intelligence for the drone strikes.

Al-Qaeda has exploited instability in the impoverished Arabian Peninsula country since a 2011 uprising overthrew president Ali Abdullah Saleh.

The American embassy in Sanaa declined to comment on Tuesday.

Meanwhile, Yemen’s interior ministry said in an overnight statement that the coast guard was on alert in several provinces following information that “terrorist groups belonging to Somalia’s (Al-Qaeda-affiliated) Shebab are planning to enter Yemen to carry out terrorist attacks”.

The ministry ordered “increased deployment in security patrols along Yemen’s coast in coordination with naval forces... to arrest any elements and foil any suspected movement”.

It was unclear if the warning was linked to the attack in Lahij.

Tens of thousands of Somali refugees cross the Gulf of Aden every year to reach Yemen.

But African and Yemeni officials have warned that Shebab fighters were also infiltrating among refugees entering the country, which is home to Al-Qaeda in the Arabian Peninsula.

Washington calls AQAP the deadliest franchise in the global extremist network.