They usually find underwater mines and enemy swimmers. But dolphins trained by the U.S. Navy were recently on a very different mission in Mexico’s Gulf of California: trying to help scientists capture and protect one of our planet’s most endangered animals — a pint-size porpoise called the vaquita.

It sounds like a Hollywood movie. Unfortunately, there was no happy ending. The rescue team hoped to protect the vaquitas in open sea pens. But when an adult female perished after capture, scientists ended the operation.

It’s a bitter blow to one of the world’s most endangered species. Largely because of lethal entanglements in fishing nets, the vaquita’s numbers have dwindled by 90 percent in the last five years, so a lot of hope was extinguished with the failure of the last-ditch rescue attempt.

But I still believe the fewer than 30 vaquita remaining today can be saved if Mexico will actually get gillnets out of vaquita habitat and halt all illegal fishing. And I hope the dramatic but failed rescue operation gets people thinking about an even larger issue — the growing threat to our planet’s entire web of life.

What can the world do now to prevent other imperiled wildlife — from walruses and elephants to monarch butterflies — from ending up in the vaquita’s precarious position?

The vaquita’s plight, after all, is no accident and no surprise. The eleventh-hour capture operation came after years of reprehensible inaction by the Mexican government, which failed to protect the little animals from being killed by irresponsible and illegal fishing practices.

Shrimp gillnets used by fishermen in the Gulf have taken a terrible toll on these marine mammals, which are best known for their elusive silver flash as they disappear from sight.

Unfortunately, vaquita cannot escape gillnets. And gillnets are used heavily by both shrimping operations and boats illegally fishing for totoaba — a large, endangered fish roughly the same size as a vaquita that’s highly prized in China for its swim bladder.

After years of failing to get gillnets out of vaquita habitat and flunking on the enforcement front, Mexico now has only one option: succeed on these fronts or be held responsible for the demise of the vaquita.

Yet Mexico’s failure to safeguard the vaquita is hardly unique. The Trump administration just shot down plans to give Endangered Species Act protections to dozens of imperiled species — including the magnificent Pacific walrus, which faces a terrifying threat as global warming melts the sea ice the animals need to survive.

Some day, in the not-so-distant future, will U.S. wildlife officials be forced to mount a desperate effort to round up the last few walruses in a last-ditch attempt to preserve the species?

What about monarch butterflies? Their numbers have dropped by more than 80 percent since the mid-1990s, thanks to reckless logging practices and insecticide use. Yet they still haven’t won endangered species protection from the U.S. Fish and Wildlife Service.

The grim truth is that we find ourselves in the midst of the sixth great extinction due to human-induced changes to our climate, oceans and wild places. And we can’t expect to capture and save every species. As with the vaquita, capture is risky, it may not work, and even when it does work, it is incredibly time and resource intensive.

It’s the kind of choice we should never have to face again. We need animals, and endangered animals in turn need our care and attention — and courage to face down some of their most serious threats, like climate change, overfishing, reckless logging and oil industry pollution.

Failing to rise to that challenge now will put one species after another on the path to extinction. And we’ll quickly find out just how lonely this planet can be.