Responding to a dearth of reliable air transport to and from Somalia, five businessmen founded Jubba Airways in 1998. The company took its name from a river that flows through southern Somalia. The five raised $800,000 from a dozen Somali investors, rented an office in Sharjah, the emirate just northeast of Dubai, hired a staff and chartered a pair of Ilyushin-18 turboprops. Sharjah had become a haven for aircraft companies from Kazahkistan, Tajikistan, Georgia and other states of the former Soviet Union. These operators took advantage of Sharjah’s absence of regulations to lease old Soviet planes to small and struggling airlines, most of which were based in war zones and former war zones.

On May 28, 1998, Jubba Airways made its inaugural flight from Sharjah to Mogadishu. At the time Mogadishu’s airport was closed and Jubba was forced to land on an airstrip a dozen miles from the capital. The company soon inaugurated a three-times-weekly service between Sharjah and Mogadishu. Later passengers flew into Baledogle, a former military base 60 miles from Mogadishu, then were bused past a series of checkpoints controlled by feuding militias.

Sharjah tightened its regulations after 9/11, expelling Eastern European charter companies and putting an end to Jubba’s flights to Mogadishu. Warsame joined the company in 2003, and he made two critical decisions. First, he began signing long-term leases for dedicated aircraft rather than chartering planes on a flight-by-flight basis. This allowed Jubba to develop a reliable flight schedule. He also registered Jubba in Kenya, a difficult two-year licensing process that gave the airline international legitimacy. (Before, Jubba had been registered in Somalia. But Somalia’s Civil Aviation Authority collapsed in 1991, and aircraft registered there can’t officially land anywhere else in the world.) Somalia was then, in 2006, enjoying a brief period of stability under the Islamic Courts Union, a militant group financed by Somali businessmen. Mogadishu’s airport reopened for the first time in several years, and Jubba began to grow. Warsame says the gunmen have mostly left Jubba alone. “They knew we are not involved in politics, we are working for the people,” he told me. “We have stayed neutral.”

Some of Jubba’s pilots are close to the ends of their careers. “I was near retirement, and I didn’t want to end up in Baghdad,” says Zaccheus Akighi, 63, a former Nigeria Airways pilot who flew in Afghanistan and Iraq for Eastok Avia before taking a Nairobi-based job for Jubba last year. Younger pilots like Jubba’s fast career track. Robert Sifuna, a 32-year-old Kenyan, jumped from Kenya Airways to Jubba last year because, he says, “it would have taken me five years to become a captain at Kenya Airways.” (War-same’s explanation: “Kenya Airways has been around for a long time. If you’re a co-pilot, you can only become a pilot when the old ones retire.”) Jubba also has a team of Ukrainian and other Russian-speaking pilots who fly its Antonovs on domestic runs inside Somalia. Although the capital has been relatively calm for the past year and a half, Jubba still offers incentives and imposes rules on its pilots. “Whenever we fly to Mogadishu, we give them combat pay,” Warsame said. “And they never stay. They land and leave as fast as they can.” Jubba pays the captain, co-pilot and flight attendants “around $100 extra” for each landing they make in Mogadishu; the bonus goes up after they make the trip several dozen times.

Raising funds to expand the airline has been a challenge. “When banks see that you are operating in Somalia, they become afraid,” Warsame said. “It is impossible to get a loan.” Instead, Jubba has depended on periodic cash infusions from the company’s original investors. During the high summer season, when Somali expatriates pour into the country, the airline charges between $150 and $165 for its domestic flights, $196 for its Mogadishu-Nairobi run and $340 for its flights between Mogadishu and Jeddah, Saudi Arabia; fares drop during the low season. The airline has to fill 70 percent of its seats to break even. “We have lost money some years,” Warsame admits, but the company has turned the business around through aggressive marketing, close relationships with European, Somali and U.A.E. travel agencies and an upsurge of business from Somali expatriates. Jubba’s planes are now 85 percent full, and the company is making a modest profit.

Although the airline business is traditionally tough, and Somalia remains volatile, Jubba’s investors perceived early on that the potential rewards outweighed the risks. “At the beginning, so few airlines were willing to operate, it gave us practically a monopoly,” Warsame said. Several more players are in the business now, but Jubba’s infrastructure, reputation and strong network of travel agents give the company a clear advantage should the situation settle down. “We are well positioned to make a lot of money,” Warsame said.

Others, too, have also begun to see Somalia as an enticing investment opportunity. Dozens of companies attended a May 2013 investment conference in Nairobi, lured by the possibility of a decisive defeat of Al Shabaab and the strengthening of the central government. Several European, American and Middle Eastern companies have explored making major investments in Mogadishu’s port. “We welcome them, but we say we are still building the legal framework [for foreign investors],” President Hassan Sheikh Mohamud, who survived an assassination attempt last fall, told me. “It is still too early.”