And in an impoverished country where every institution has crumbled, they have become heroes because they are the only business in town.

“The pirates depend on us, and we benefit from them,” said Sahra Sheik Dahir, a shop owner in Haradhere, the nearest village to where a hijacked Saudi Arabian supertanker carrying $100 million in crude was anchored.

These boomtowns are all the more shocking in light of Somalia's violence and poverty: Radical Islamists control most of the country's south, meting out lashings and stonings for accused criminals. There has been no effective central government in nearly 20 years. Life expectancy is 46 years; a quarter of children die before age 5.

Never miss a local story.

Sign up today for a free 30 day free trial of unlimited digital access.

But in northern coastal towns like Haradhere, Eyl and Bossaso, the pirate economy is thriving thanks to ransoms that have reached $30 million this year alone.

In Haradhere, residents came out in droves to celebrate as the looming oil ship came into focus this week off the country's lawless coast. Businessmen started gathering cigarettes, food and cold glass bottles of orange soda, setting up small kiosks for the pirates who come to shore to resupply almost daily.

Dahir said she is so confident in the pirates, she started a layaway plan for them.

“They always take things without paying and we put them into the book of debts,” she said in a telephone interview. “Later, when they get the ransom money, they pay us a lot.”