Puntland, one of the two breakaway statelets from Somalia, is currently headquarters for most of the pirate activity in the country (and the largest concentration of pirates on the planet.) It wasn't always that way.
In 1998, when Puntland was formed, this portion of northeast Somalia, suddenly became peaceful and began to prosper. The cause of this seeming miracle was all about tribal politics. The Darood clan (as the tribes are called here) managed to settle, for the moment, many feuds and rivalries, and set up a new country; Puntland (after the ancient name for this part of the world; "Punt"). But as the years went by, two things happened. First, some of the old clan feuds revived. But worst of all, many of the gangster factions among the Darood found that the truce caused their criminal activities to be generally ignored, as long as the victims were not fellow Darood. But as Puntland became a den of thieves (and kidnappers, smugglers and, pirates), their neighbors began to notice. While many Puntland residents would like the gangsters to go away, that won't happen. The bad guys are Darood, and this is their home too. So the government says one thing to foreigners ("we're going to clean up this mess") and something else (nothing) to their fellow Darood. There's no solution in sight for this mess.
The Puntland situation is not unique, it is happening, or recently took place, in other parts of the world. There is a cure, but it may not be applicable to Puntland. One of the more notable other "Puntlands" is Chechnya, long a restive region in southern Russia. Chechnya's problems arose from attempts to become an independent nation.
When Chechnya first tried to separate itself from Russia (after the dissolution of the Soviet Union in 1991), Russia responded with an inept military operation (1994-6) that killed over 35,000 people, and failed. Russia withdrew and left the Chechens to their own devices. In effect, the Chechens could pretend they were independent, while the Russians pretended they weren't. Problem was, the Chechens could not agree on how to form a unified government, and stumbled into a perpetual civil war. Along the way, some factions adopted Islamic radicalism, and began moving into adjacent areas, that were still very much under Russian control. Other, less religious, factions, used Chechnya as a safe haven for smuggling and kidnapping operations throughout southern Russia.
In 1999, the Russians came back in, and the second pacification campaign made greater use of Special Forces and better trained and led troops in general. This campaign killed about 5,000 people, but succeeded. The main reason for the success was the use of an ancient Russian technique. Basically, the Russians sought out Chechens who would be willing to run Chechnya, under Russian supervision, as long as they could keep the crime and terrorism under control. The Russians didn't care how "their Chechens" did it, as long as there was not a return to the 1994-9 era of rampant criminal activity. And no Islamic terrorism either. Over the last few years, the violence, and Islamic terrorism inside Chechnya, and Russia, greatly declined.
The problem with Puntland is that there's no large neighbor willing to play the role that Russia took in Chechnya. The industrialized nations that are suffering the most from the Puntland based piracy, are reluctant to intervene. Somalis have been known, for centuries, as ungovernable. The reputation is well earned, and no one wants to get involved. Meanwhile, Somalis are quite willing to get involved, via criminal activities, with their neighbors. Eventually, the pain to the neighbors will become too much. How long it will take for that to happen, is uncertain. Just like everything else in Somalia.