Largely out of sight, criminals pillage the oceans. They steal millions of tonnes of fish each year. That is a huge economic loss, estimated to be somewhere in the tens of billions of dollars. It is an even larger threat to food security; a billion people depend on fish as their source of protein, and in many of the countries that are most dependent, one fish in three is stolen. Illegal, unreported and unregulated (IUU) fishing defeats governments’ efforts to manage their resources, and it undercuts the millions of fishers who are playing by the rules.

IUU fishing is a human rights crisis. The vessels that fish illegally often carry slaves. Hundreds of thousands of people are trapped on boats, facing wanton brutality.

It is also a security threat. Vessels that fish illegally are often trafficking drugs or arms and laundering money. And when illegal fishing destroys the food security and livelihoods of coastal countries, it creates fertile ground for the recruitment of terrorists. The explosion of pirate attacks in the Western Indian Ocean and the Gulf of Guinea, for example, was linked to the surge in IUU fishing by foreign fleets decimating the stocks that sustained local communities.

IUU vessels have operated with impunity. They travel anonymously, hopping from one flag of convenience to another. Law enforcement agencies often have little information about a vessel’s registration, ownership, or even where it is licensed to fish. Illegal vessels are also shielded by the vastness of the ocean and the near impossibility of catching boats on the high seas. Small island developing states have been particularly vulnerable, possessing vast ocean resources but very limited capacity to patrol their domains or apprehend transgressors.

But we don’t have to catch boats on the high seas if we can instead identify those that are fishing illegally and close the ports and markets on which they depend.

That prospect is now in sight. Technological advances are bringing new transparency to the sector. Major market actors are increasingly demanding proof of provenance. And governments are embracing an international agreement to keep illegal fish out of their ports.

Large oceangoing vessels must carry transponders to help keep them from running into each other. Their pings can be picked up by satellites. Global Fishing Watch and others are now using those satellites to track fishing vessels across the world, devising algorithms that can detect when they are fishing and how. Increasingly, that capability will be complemented by video cameras on boats that can use facial recognition technology to identify and count the fish being caught and can also monitor the treatment of the crew. Blockchain and other technologies allow seafood to be traced from the moment of capture all the way to the supermarket shelf.

Enabled and perhaps prompted by these technological advances, a growing number of companies across the supply chain are demanding full traceability for the fish they buy. Through the Tuna Traceability Declaration, 66 leading retailers and processors have pledged that by 2020 they will only buy tuna that can be fully traced back to the vessel and trip on which it was caught. Through the Seafood Business for Ocean Stewardship (SeaBOS) initiative, the 10-largest seafood companies have also pledged to take action.

Governments are now poised to step up their efforts. The Port State Measures Agreement (PSMA), a UN agreement which came into force in 2016, aims to prevent vessels who have engaged in IUU fishing from landing their catch. It also provides a powerful platform for governments to act together.

The success of PSMA will depend on comprehensive coverage and coordinated implementation. The first priority, of course, is that all important port and flag states participate, so that vessels with illegal catch have nowhere to go. Eighty-five countries [and the European Union] are now participating in PSMA. Several additional important fishing nations have announced that they will ratify soon. A push for further ratifications is urgent.

Once states have joined the system, it is equally important that they cooperate to make it work. They need to share basic information about each vessel – its registration and ownership, what rights it has to fish, and what fishing it has been doing. They need to create the systems that allow communication among ports in real time – so that a vessel turned away from one port cannot slip into the next. And wealthy countries need to invest in making sure that developing country ports have the resources and capacity they need to do their part.

The ocean is vast and it remains difficult to catch rogue ships that sail over the horizon. But we now have the tools to detect ships that are flouting the law and to shut down their lifelines – to ensure they have no place to land their catch and no one to buy it. Acting in concert, technologists, companies and governments can close the ocean to IUU fishing, and the many horrors that come with it.