AFGOOYE, Somalia — Armed with machetes, the men push their way through the densely packed rows of trees, emerging every few minutes with large bundles of green bananas over their shoulders.
A guard, his chest crossed with bullet belts, his hands cradling a Russian-made rifle, scans the tree line for intruders as the men throw the bananas on a trailer before dashing back into the plantation for another load.
When the trailer is piled high with bananas, it is pulled by tractor to a nearby warehouse, where the fruit is sorted and boxed for transport to destinations across Somalia and as far away as the Middle East.
After years of warfare that decimated an industry that was once the largest in Africa, the banana is making a tentative comeback in Somalia. Farms are stepping up production and eyeing overseas markets that have been dormant for years.
“Last April we exported to Saudi Arabia for the first time in 23 years,” said Kamal Haji Nasir, 30, whose father, owns this plantation in Afgooye, a town on the Shebelle River, about 45 minutes’ drive from Mogadishu. “We are excited and hopeful.”
For more than two decades, Somalia was the epitome of a failed state — a country rife with war, anarchy, famine, piracy and terrorism. Many of those problems persist — there has been a recent surge in attacks by Shabab militants, the government is riven with infighting and the United Nations has been warning of a growing risk of famine — but the country has nonetheless made some progress in the past few years.
Somalia elected a new president and adopted a constitution in 2012, bringing some stability, and attracting pledges of aid from international donors. Somali pirates, who once threatened international shipping in the Indian Ocean, have largely been contained and the Shabab have lost their grip over many towns.
“By any measure, Somalia today is in a better situation than it has been for the past 23 years,” said Nicholas Kay, the United Nations’ special representative for Somalia.
That stability has allowed farmers like Mr. Nasir, who studied agriculture at Mogadishu University, to return to a business that has been in his family for four generations.
Banana farming was brought to the fertile Shebelle and Juba river basins in the southern part of the country by Italian colonists in the 1920s. Soon, bananas became a major staple of Somali cuisine, consumed with rice or pasta, or just as a fruit, and farmers began exporting to Italy and the Middle East. With investment by Italian and American fruit companies, the banana trade reached its peak in the 1980s, led by the brand Somalita, which was partly owned by De Nadai, an Italian company. In 1990, Somalia’s banana exports were worth $96 million, according to Mohamood Abdi Noor, a former World Bank agricultural expert.
“The industry was doing very well and moving forward,” said Hasan Haji Osman, an agricultural consultant, who previously worked for Italian and Somali fruit companies.
That all came to a halt when civil war broke out in 1991. The government collapsed, and Somalia became a battleground in which warlords and Islamic extremists vied for control and pirates became the scourge of the surrounding seas. In what became known as “the banana wars,” rival warlords fought to control exports of the fruit as a source of hard currency. The once-thriving banana industry fell apart. Irrigation systems were damaged, plantations were abandoned, farmers were displaced, and storage facilities and ports were destroyed.
Mr. Osman shook his head sadly as he recalled farms lying damaged and unattended.
“What was in my head were the banana farms with no workers” and with destroyed irrigation systems, he said. “I was thinking about that more than my family.”
For those who continued to farm, the breakdown of supply chains and transport links proved to be disastrous. “There were no markets for our bananas,” said Abu Bakr Hirabe, 70, who has been farming bananas in Afgooye for decades. “We lost a lot of money.”
As the security situation began improving a few years ago, Mr. Hirabe, along with other banana farmers, set about trying to rebuild the industry. They repaired irrigation systems, hired workers and security guards and set their sights on markets overseas. In 2011 they established a company, FruitSome, to market and export their bananas.
Mr. Hirabe said FruitSome had contacted Del Monte, Dole and fruit companies in the Middle East, but the response so far has been mixed.
Dole, which has in the past invested there, said it was cautious about committing to Somalia.
“The Somali banana industry has potential,” Xavier Roussel, the marketing and communication director at Dole Fresh Fruit Europe in Hamburg, Germany, said in an email. But, he added, “right now it seems difficult to develop any agriculture program in Somalia because of the local situation.”
The banana farmers, however, have had some success connecting with regional buyers, with some help from the United Nations Food and Agriculture Organization.
The F.A.O. helped organize a conference in Dubai this year at which Somali businesses exhibited their goods to an international audience for the first time in years. FruitSome had its bananas on display.
“We let them taste them and they were surprised,” said Omar Farah, a FruitSome representative. “Some asked us, ‘How can we order this?’ ”
Since then, FruitSome has exported five containers to the Middle East and hopes that some of the contacts forged at the conference will yield further gains.
Somali bananas, experts say, have several advantages that make them marketable, including easy and short access to seaports from farms and proximity to markets in the Middle East.
And, aficionados say, they taste great.
“Sweet, slightly sour, creamy vanilla,” is how Edward Baars, an agricultural engineer with Cgiar, a group of research organizations, described their taste. “The quality of Somali bananas is near unmatched in taste and texture, which is due to the unique growing conditions.”
Despite that, experts say that considerable issues need to be addressed before Somalia can once again become a leading banana exporter. Mr. Noor said that irrigation and drainage systems, roads and storage facilities all needed to be improved, as did quality control and packaging. And, he added, security was still an issue.
Jose Lopez of the Food and Agriculture Organization said the country needed to attract more private investment to rebuild the industry.
Mr. Farah of FruitSome, however, said he was optimistic about the future.
“When you try a Somali banana,” he said, “you can tell the difference.”