A United Nations helicopter carrying nine passengers was captured in Somalia on Wednesday by the terrorist group Al Shabab after making an emergency landing because of technical difficulties in an area controlled by the group, three senior Somali officials said.

Six of the passengers were captured, while two escaped and one was killed, according to the officials, who spoke on the condition of anonymity to discuss sensitive matters. The circumstances in which the person was killed were unclear.

There were foreigners among the passengers, one of the officials said, though their nationalities were not known. At least one Somali national was on the helicopter, another official said.

Al Shabab, which means “The Youth” in Arabic, has spread havoc across Somalia for almost a decade and half, promising to topple the U.N.-backed national government and to establish an Islamic state in the Horn of Africa nation. The group commands between 7,000 and 12,000 fighters and makes about $120 million annually through extortion and taxation, according to Somali authorities and U.S. intelligence officials.

The helicopter, which belonged to the United Nations Support Office in Somalia, provides logistical assistance to the 17,000-member peacekeeping forces with the African Union Transition Mission in Somalia. That support includes ferrying food and fuel, providing land and air transportation as well as casualty evacuations.

The helicopter landed in the Galgaduud region in central Somalia on Wednesday, but it was not immediately clear why it had to land. The fates of the two passengers who fled were still unknown, one of the officials said.

The U.N. Support Office in Somalia did not immediately respond to requests for comment. There was no immediate comment from the Shabab, or any updates on the websites affiliated with the group.

The flight had left the town of Beledweyne in central Somalia and was heading to Wisil, located more than 200 miles east, two Somali officials said.

Stéphane Dujarric, the spokesman for the U.N. secretary general, confirmed the capture at a press briefing on Wednesday but declined to comment further.

“Response efforts are underway,” Mr. Dujarric said. “For the safety of all those aboard, we will not say more. Our primary concern is for their safety.”

Since coming to power in 2022, Somalia’s president, Hassan Sheikh Mohamud, has vowed to eliminate the Shabab both militarily and financially. He poured troops into areas in south and central Somalia, including near where the helicopter landed.

With the help of American drones in the air and local clan militias on the ground, the Somali troops have liberated dozens of small towns and villages, according to Somali officials and security officers.

Mr. Mohamud’s administration also sought to limit the Shabab’s economic power by restricting its access to the financial system and vowing to shutter the businesses that pay it extortion fees.

But the Shabab have remained belligerent in the face of this offensive, carrying out multiple attacks against security forces and civilians across the country. The group also targeted and killed dozens of local officials and town administrators who were mobilizing against it and supporting the government in the counterinsurgency effort.

The Shabab have treated hostages brutally in the past, including killing them in hotel sieges in the Somali capital, Mogadishu, and at a university dormitory in Kenya.

Experts say the group will most likely use the hostages as leverage or try to demand ransom for their return.

“In the past, Al Shabab has displayed those captured by the group in propaganda videos to make demands, while also attempting to to exchange other hostages for ransom,” said Omar S. Mahmood, the senior Eastern Africa analyst with the International Crisis Group, a nonprofit.

On Wednesday evening, one of the senior Somali officials said there were ongoing discussions both within the government and with other security and U.N. agencies about what to do about the hostage situation.

“We are trying to do anything we can to rescue them,” the official said.

Farnaz Fassihi contributed reporting from New York.