Five years ago, the isolated outpost of Eyl was Somalia’s most notorious pirate lair. Perched above the crashing waves of the Indian Ocean, the ramshackle town played host to wheeling and dealing pirate kingpins who would roar through the rutted streets in tinted 4x4s as captured ships languished in the shallow waters.

Eyl had become a byword for everything that was wrong with Somalia: a place of anarchy where a civil war and two decades of fighting had destroyed even the most basic institutions of a functioning state, a place where the gun and ransom dollars ruled. The lawless and deadly mayhem was captured in the 2012 film A Hijacking in which a Danish freight vessel was captured by pirates and its captain murdered.

Pirate-hunting western warships belatedly dispatched to the region as part of Nato, US and European Union forces to pacify the pirates and end the hijacking and hostage-taking of western ships and their crews, seem to have won the battle.

Five years later, Eyl is a very different place. The pirates have gone, leaving the outpost to its fate. As with pretty much everywhere else in Somalia, there is an air of neglect with its historic buildings in disrepair. A tiny fort on the beach serves as a reminder that Eyl was once famous for something else – Sayyid Mohammed Abdullah Hassan, the revered 19th-century jihadi and national poet, better known to British forces fighting him in the early 20th century as the Mad Mullah.

Unfortunately for the local population, as the pirates have departed, other aggressors have returned. While the world has shifted its attention elsewhere, marauding flotillas from countries such as Yemen, Iran and South Korea – in flagrant breach of international maritime law – have begun to plunder Somalia’s rich fishing grounds, plunging the local fishermen who hold up the town’s economy into financial ruin.

Overfishing, which devastated the livelihoods of coastal communities a decade ago, is regarded as the principal reason for the initial outbreak of piracy. The waters off Somalia’s 1,880-mile coastline are among the richest fishing grounds in the world, teeming with shark, tuna, sardines, snapper and lobster. The illegal fishermen, their rusty tubs flying flags of convenience and protected by armed Somali brigands from further up the coast, chase off local fishermen who come too close – ramming their boats, shooting at them or sabotaging their gear. It’s a deadly fight that has raged largely unseen and unreported.

Among fishermen on Eyl’s sweeping beach, the mood towards the foreign fishing fleets is bitter. Musa Mahamoud, a lithe and fit-looking 55-year-old, points to the latest provocation – his fishing nets, slashed at sea.

Many Somalis want Nato and EU frigates to do more to tackle the illegal fishermen in the absence of any Somali capability to do so. While the Gulf-funded Puntland Maritime Police Force, based in Bosaso, has notched up some successes against unlicensed boats in the Red Sea, an Eyl detachment is still awaiting speedboats.

“Nato came because of the piracy, but the cause of piracy is the illegal fishing,” says Wa’is, the Eyl official. “If Nato can chase away the pirates, then why not the illegal fishermen?”

It is a view echoed by Abdullahi Jama Saleh, Puntland’s counter-piracy minister, who accuses the west of having “a mandate to catch the little thief, but not the big one”.

Facebook Twitter Pinterest A Somali pirate pictured in 2012 in front of a Taiwanese fishing vessel that washed up after the crew were ransomed. Photograph: Farah Abdi Warsameh/AP

For Mahamoud, it is just a small step back to the life he used to lead, sourcing resources and weapons for the pirates. Both the Nato and EU mandates expire at the end of 2016, and western officials say member states are applying pressure to redeploy the warships to the Mediterranean and elsewhere. “If Nato goes, we will attack them,” says Mahamoud, eyes blazing as he rails against the western warships seen to be protecting the illegal fishermen. “We will kill and be killed.”

Somalia’s modern-day piracy began when impoverished fishermen extorted money from unlicensed foreign fishing vessels. It evolved into a multimillion dollar criminal enterprise that at its height saw a $9.5m ransom paid for the release of the South Korean tanker, Samho Dream. In early 2011, pirates were holding more than 700 captives.

“When things got out of hand, anyone would go anywhere,” says Asha Abdikarim, who runs a small hotel on Eyl’s shore. “A foreign vessel was a foreign vessel.” She, for one, is thankful that the pirates left. “There were very heavily armed, there was lots of shooting, lots of qat [a mild narcotic],” she recalls. “We had no peace.”

Now, says Faisal Wa’is, a frustrated Eyl official, nothing has changed. “We are back to square one,” he says. “The illegal fishermen are back, and … I am afraid that piracy may come back.”

“Illegal fishing is gouging from the nascent Somali economy a source of revenue that could help build much-needed infrastructure, provide healthcare and education to those who go without, and restore arid lands to grazing pastures,” says Degan Ali, executive director of Adeso, an African NGO working with coastal communities in Somalia.

While the international donors have attempted to develop Somalia’s fisheries industry, which has the potential to be a huge coastal employer, navigating the myriad vested interests has sunk even the most localised of projects. A UN-funded ice plant in Eyl, enabling fishermen to freeze their catch for export, has lain idle for more than a year since construction was completed amid wrangling over who should control it.

The pirates still attract broad sympathy in Somalia. Those caught were tried in foreign lands and later repatriated to Somalia to serve terms ranging from two to 24 years. But most of those incarcerated in Puntland’s prisons in Bosaso and Garowe are the foot soldiers. The pirate kingpins are still at large, easily able to elude the weak authorities that are believed to have benefited from the trade.

In March, pirates seized two Iranian dhows off central Somalia – one later escaped – and a UN report last month named notorious pirate Mohamed Osman Mohamed “Gafanje” as the mastermind behind the attack.

“The thing people forget is that the pirates haven’t gone away, they are still holding 50 hostages, most of those victims from illegal fishing boats,” says John Steed from Ocean Beyond Piracy. “They could easily go back to taking vessels again.”

Whether the threat is enough to convince the west to continue bearing the cost of a substantial naval presence in the Indian Ocean is far from clear. A hasty departure could make the situation worse. Saleh, the counter-piracy minister, says Somalis know that the penalties would be severe if caught. “They will be more lethal this time,” he says. “They know there is no mercy for them. Before they were after money, now it’s a matter of survival. It’s do or die.”