Regional carriers Daallo Airlines and Jubba Airways profited independently for years in one of the world's toughest markets, competing on routes to war-torn Somalia that most avoided.
Yet as the guns fall silent, the rivals face a new battle that has pushed them to merge: competition from big international carriers such as Turkish Airlines, Ethiopian Airlines and flydubai, muscling into Somali airspace.
"The odds are against us, but that is the reason we are making a merger," Mohamed Yassin, chief executive officer of Daallo, told Reuters. "We are not sitting back. We are trying to put our forces together ... to face the new challenges."
Hardy entrepreneurs running airlines, money transfer firms and mobile phone companies innovated and thrived in Somalia for more than two decades, keeping Somalis connected to the world as the state was
Now Mogadishu's Western-backed federal government is slowly extending its control and imposing a semblance of political order, which is also changing the commercial landscape for firms such as Daallo and Jubba that once had the market to themselves.
Turkish Airlines now offers a daily service to Mogadishu, while Ethiopian Airlines flies to Hargeisa in the self-declared state of Somaliland in the north, a destination flydubai plans to serve from March. Kenya-based African Express also serves Mogadishu and other Somali cities.
Turkish Airlines said it had increased flights to Mogadishu in January to seven a week from four but said it had "no near future plans" to add other destinations in Somalia.
Daallo and Jubba, which offer domestic flights within Somalia but face more competition on international routes, will on Thursday launch African Airways Alliance, a merged entity owned equally by founders of the former rivals.
"We are trying to attract other carriers to join the alliance to scale the business, to help growth and sustainability," said Yassin in an interview in Nairobi with one-time rival and now partner, Jubba Chairman Said Qailie.
He said the two airlines would still use their Jubba and Daallo brands after the merger.
Together, Daallo and Jubba carried about 250,000 passengers in 2014 and generated revenues of more than $75 million, the airlines said in a statement. By comparison, Turkish Airlines carried 54.7 million passengers in 2014.
Daallo is the privately owned national carrier of Djibouti, north of Somalia, while Jubba is registered in next door Kenya to the south. There is no official Somali flag carrier after Somali Airlines halted services in 1991 when war flared up.
Yassin described Somalia as a "home market" for both airlines after they acted as a "lifeline" in the war.
But he said the Somali authorities had offered little support for Daallo and Jubba on issues such as flight frequencies or capacity of planes used by new entrants, topics typically negotiated in air agreements between two territories.
"They sympathise with us, because we were the lifeline for Somalis in the last 20 years," said 62-year-old Yassin. But he said they were not in a position to dictate terms: "If anybody comes to them, they cannot reject (them)."
Yassin said this put the regional carriers at a disadvantage to bigger international players with larger fleets and access to cheaper financing. "There should be fair competition," he said.
Former Finance Minister Hussein Halane, who left his post when a new cabinet was sworn in this month, said Daallo and Jubba were viewed as Somali airlines that deserved help but the government had limited capacity to deal with the demands it faced and Somalia needed major carriers to boost international links.
After the merger, the airlines will operate two newly leased Airbus A321-111s and a Boeing 737-300, a statement said. In addition, the firm will use a BAe 146-200, which it owns, for charter services. By mid-2015, two new turboprop ATR aircraft will be introduced for domestic flights.
In 2015, the merged airline plans to increase the number of destinations to 21 from 13 now. Existing destinations include Nairobi, Dubai and Jeddah. Planned destinations include Addis Ababa, Yemeni airports, Kampala and European cities.