Tom Vanden Brook, and William Cummings

USA TODAY

WASHINGTON — U.S. Special Operations troops led Yemeni forces in a pre-dawn raid on a cave in Yemen Tuesday to rescue hostages held by al Qaeda terrorists, according to two U.S. officials.

There were six Yemenis, a Saudi and an Ethiopian rescued in the operation, according to The New York Times, which first reported the operation.

The U.S.-led force killed seven al-Qaeda militants dead after a shootout, one U.S. official said. The officials spoke on condition of anonymity because they were not authorized to speak publicly.

About two dozen U.S. commandos led a small number of Yemeni troops on the mission, who had been trained by Americans in counterterrorism. They flew into eastern Yemen by helicopter and then hiked several miles in the dark to the militants' shelter in a mountainside cave. The militants were caught by surprise by the attack, which was carried out by Navy SEALs, one official said.

Helicopters swooped in, scooped up the troops and freed hostages and flew away safely, one official said.

The operation was carried out at the request of Yemen's President Abdu Rabbu Mansour Hadi, and was, "at least partly an attempt to bolster the stature of Mr. Hadi, a committed but wobbling United States ally whose authority was badly undermined when a rebel group suddenly seized control of Yemen's capital in September," according to the Times.

The U.S. military's Combined Joint Task Force-Horn of Africa operates from Camp Lemonnier, in Djibouti, just across the Red Sea from Yemen. One of the primary goals of the task force is to fight violent extremists with partner nations. Troops based there have led raids and drone strikes on al-Qaeda-linked terrorists in Yemen and Somalia.

A Navy SEAL raid in October 2013 in Somalia encountered such heavy gunfire by militants that it was called off. The SEALs had aimed to attack the al-Qaeda-linked militant group responsible for a deadly attack on a shopping mall in Kenya.