Scott Darden, son Eesa and wife Diana in front of the Burj Al Arab hotel in Dubai in 2015. (Courtesy of the family)

Two of three American hostages who were detained for months by rebels in Yemen’s capital were freed Sunday with the assistance of the sultan of Oman, who helped negotiate a plan to fly them out of the country, U.S. officials said.

The men were released at the airport in Sanaa, but not without complications. The United States had hoped to secure the freedom of all three Americans, officials said, but the Shiite rebels decided to continue holding a 35-year-old American Muslim convert for reasons that remain unclear.

The men were flown to Muscat, the capital of Oman, which has forged a close relationship with the United States. Their condition was not known.

One of the men had been previously identified as Scott Darden, 45, an employee of a Louisiana-based logistics company. The other is Sam Farran, 54, a security consultant from Michigan.

“I am speechless,” said Darden’s wife, Diana Loesch, who was on her way to meet her husband. “I am really thankful for all the diplomatic efforts. The Omanis are very good at what they do.”

A British citizen also was released, officials said. U.S. officials asked that the name of the third American, who had been in Yemen teaching English, be withheld because it could jeopardize efforts to free him.

Attempts to free the men have been complicated by the deteriorating security situation in Yemen since Shiite Houthi rebels seized power earlier this year, prompting an intense Saudi bombing campaign in support of embattled President Abed Rabbo Mansour Hadi.

The Houthi-controlled internal security branch detained Farran and Darden on March 27. Darden had contacted Farran, a former Marine, for help in finding safety when the Saudis began to bomb Sanaa.

The two had gone to a secure location but were then arrested, officials said. The circumstances of the third American’s detention remain unclear.

Ned Price, a spokesman for the National Security Council, said in a statement: “We welcome the release of two U.S. citizens who had been detained in Yemen since earlier this year. As we have informed their families, these individuals departed Yemen today and have since arrived in Oman. The U.S. ambassador to Muscat and a consular official met them upon arrival and will provide all possible consular assistance.”

Price thanked the Omani government and its longtime ruler, Sultan Qaboos bin Said.

Darden was involved in overseeing the transport of humanitarian supplies in Yemen for New Orleans-based Transoceanic Development.

Darden, who speaks Arabic fluently, has worked for Transoceanic for less than a year. He is originally from Atlanta, but his family was living in Dubai.

Gregory Rusovich, Transoceanic’s chief executive, said in a statement: “We cannot begin to express the sense of joy and relief we feel with Scott’s release. He has been safely evacuated and will be reunited with his family very soon.”

Another American, journalist Casey Coombs, also was detained by the Houthis but was released in June with the help of the Omani government.

Securing the release of the Americans was a priority for the Obama administration, which recently revamped policies for handling hostage situations after coming under widespread criticism from families of captives.

To better coordinate with other U.S. agencies and families, the administration created the Hostage Recovery Fusion Cell, which is led by the FBI. Last month, Secretary of State John F. Kerry appointed the first special presidential envoy for hostage affairs to work closely with the fusion cell.

Julie Tate contributed to this report.