The U.S. military now plans to keep a small force of Special Operations advisers in Yemen — deployed in April for a limited, short-term operation — for the foreseeable future, a step toward reestablishing a counterterrorism mission that was shut down last year by civil war.

U.S. officials, speaking on the condition of anonymity to discuss sensitive operations, said the team of about a dozen men would assist troops from the United Arab Emirates, who, along with other Arab forces, are seeking to track down militants from al-Qaeda in the Arabian Peninsula (AQAP), the most potent affiliate of the main al-Qaeda group.

The Pentagon recently dispatched another Special Operations team to Yemen on a separate mission to assess security and size up local figures who might cooperate with the United States in the future.

The decision to extend the U.S. troop presence around the city of Mukalla, which Emirati and Yemeni forces recently recaptured from AQAP, returns American troops to a country that had been a major focus of counterterrorism operations until intense factional fighting forced the withdrawal of U.S. forces.

Pentagon spokesman Christopher Sherwood declined to comment on the deployment of the U.S. Special Operations forces.

“We continue to urge all parties to deescalate the conflict,” Sherwood wrote in an email. “Our collective goal is to achieve lasting stability in Yemen through a negotiated political solution facilitated by the United Nations and involving all parties.”

While the United States has continued to carry out occasional airstrikes against AQAP, a renewed, on-the-ground presence would provide greater visibility into the array of armed groups across Yemen and provide the U.S. military flexibility to partner with local forces on a range of missions, as happened in the past, officials said.

In April, at the request of the Emirati government, the United States placed the small Special Operations team in Mukalla, an important port city that had been in al-Qaeda’s hands for more than a year. The Emirati troops are part of a coalition led by Saudi Arabia that has been battling Shiite Houthi rebels across Yemen since 2015.

Offshore in the Gulf of Aden, American ships from the Boxer Amphibious Readiness Group USS Boxer Amphibious Ready Group, including the 13th Marine Expeditionary Unit, sent aircraft and commandos to Mukalla to support the operation there. On the ground in Mukalla, the American forces provided intelligence support and helped Arab troops identify militant targets.

When the small ground presence was made public in May, Pentagon officials said the U.S. troops were “providing limited support” to Arab troops in and around Mukalla.

But the Mukalla battle ended more quickly than expected. Instead of defending the city, many militants fled into the surrounding countryside.

This week, the government of the UAE announced that its troops had achieved the government’s main military goals in Yemen: securing the strategic city of Aden and dealing a blow to AQAP in Mukalla.

Yousef al-Otaiba, the Persian Gulf nation’s ambassador in Washington, said Emirati forces were working with Saudi and Yemeni forces in an ongoing effort to track down AQAP fighters across Yemen. He declined to say how many Emirati troops would take part in that mission.

“I imagine it will go on for a long period of time,” he said. “The military priorities have shifted from fighting the Iranian-backed Houthis to being more focused on AQAP.”

Saudi Arabia and the UAE have accused Iran of using the Houthis to stoke a proxy war, but the extent of any Iranian support is unclear.

Otaiba said that American assistance was valuable to Emirati military efforts. “Remember, we are fighting a common enemy,” he said.

The U.S. troop presence, though small, is a significant turning point in the U.S. strategy toward Yemen following the collapse of the Yemeni government in late 2014. Houthi rebels overran the capital, Sanaa, and, shortly after, the Pentagon withdrew the contingent of special operators who had been advising their Yemeni counterparts at Anad air base near Aden.

The departure was a significant setback in the U.S. campaign against AQAP, which has repeatedly sought to carry out terror attacks against the West.

Steven Stephen Seche, a former U.S. ambassador in Yemen, said that a new commitment of U.S. forces in Yemen would better enable reconnaissance flights and airstrikes against al-Qaeda.

According to Seche, now executive vice president of the Arab Gulf States Institute, a Washington think tank, Yemen’s rough geography has allowed AQAP to move freely.

The United States would benefit from a continued partnership with the UAE, Seche said, since that country had a strong sense of urgency in the fight against AQAP.

“If the UAE is there and capable, why wouldn’t we [help them continue to go after AQAP]?” another U.S. official said. “We’re going to do what we can.”

Brig. Gen. Ahmed Asiri, a spokesman for the Saudi-led military coalition, said that Saudi Arabia and its allies are working to manage Yemen’s ungoverned spaces to prevent militant forces from regrouping.

“By increasing the presence of the Yemeni army and government . . . you deny al-Qaeda a safe haven,” he said in a recent interview.

Asiri said the primary U.S. contribution had been intelligence and the deployment of “certain elements” to assist Arab-coalition and Yemeni forces.

He added that the U.S. military had not shared any plans for a longer-term presence in Yemen but said that Saudi Arabia generally supported any enhanced cooperation with the United States.

The United States has been helping Riyadh in its battle against the Houthi rebels from the beginning, providing surveillance flights and aerial refueling, but officials have tried over the past year to focus the operations there more directly on AQAP.

Complicating U.S. support for Saudi Arabia and its allies is the widespread criticism of high civilian casualties in the conflict in Yemen.

Last month, the United Nations put Saudi Arabia on a list of countries responsible for violating children’s rights in armed conflict after determining that the Saudi-led coalition was responsible for the deaths of 60 percent of the 1,953 children reported killed since the start of the conflict. Saudi Arabia has since been removed from the list after threatening to cut its support for U.N. peacekeeping programs.

Saudi officials insist that they make every effort to avoid civilian casualties.

Speaking to reporters in Washington on Friday, Saudi Foreign Minister Adel al-Jubeir, said that Saudi Arabia had reduced the pace of military operations across Yemen and was hoping that U.N.-sponsored peace talks would bring a political resolution to the conflict.

The United States has recently picked up the pace of its airstrikes on AQAP.

On Friday, the Pentagon announced that it had conducted three “counter-terror” airstrikes in Yemen between June 8 and June 12. According to recently released numbers, the United States has conducted 12 airstrikes in Yemen since this year. One strike, in March, was assessed to have killed 56 AQAP militants, according to a Pentagon news release. No figures were released regarding potential civilian casualties.

Since 2002, the United States has conducted roughly 150 airstrikes in Yemen, according to a Long War Journal database.

Karen DeYoung and Greg Jaffe contributed to this report

Read more: