One foggy morning last April, a dead humpback whale washed up on New York’s Rockaway Beach. It was a young male, thirty-one feet long, and had extensive bruising—the result of contact with “something very large,” according to Kimberly Durham, of the Atlantic Marine Conservation Society, who performed the necropsy. The Rockaway whale was one of sixty-eight humpbacks that have died between North Carolina and Maine since 2016, casualties in what the National Oceanic and Atmospheric Administration is calling an “unusual mortality event.” And humpbacks, it turns out, are not the only species suffering. Last August, NOAA declared another unusual mortality event, this time for North Atlantic right whales: eighteen of the endangered animals have died recently. Then, in January, the agency announced that minke whales were getting stranded, too: twenty-one have died. The occurrence of three simultaneous and ongoing cetacean mortality events along the East Coast is not just unusual; it is unprecedented.

A few centuries ago, thousands of whales travelled near New York. Even so, Ishmael had to quit the city to find the Pequod; the big whaling operations arose to the east and north, where high bluffs afforded a clear view of the sea. By the late nineteenth century, the whales of the American Atlantic had been almost obliterated, and by the end of the nineteen-sixties, when the global whaling industry brought in a haul of seven hundred thousand whales, the same was largely true the world over. Since then, however, as regulations protecting whales, water quality, and fisheries have taken effect, many species have been recovering, some from perhaps as little as ten per cent of their original populations. Whales are again travelling close by—feeding, mating, calving, calling, nursing, breaching, soaring above the continental shelf, sustaining whale-watch cruises out of Rockaway, and, occasionally, making news in the Hudson and East Rivers.

But the ocean is no longer the same. These days, waters are warmer, noisier, and busier than ever. In and around the port of New York and New Jersey, shipping has increased, as it has globally. The harbor was recently deepened and the Bayonne Bridge elevated to accommodate supersize container ships, the first of which arrived last fall. Marine mammals die of many causes, including infections, entanglements with fishing gear, noise that stymies communication and hunting, and, especially, ship strikes. Of the sixty-four whales necropsied in NOAA’s continuing investigations, one-third show injuries consistent with blunt-force trauma. “It is depressing, but I do believe there are solutions,” Mark Baumgartner, a marine ecologist at the Woods Hole Oceanographic Institution, in Massachusetts, told me recently. “It is a very old story. We get ourselves into some kind of bind, and we look to technology to get us out of it. And sometimes it does.” Twenty-two miles off Manhattan, in crowded waters crossed by whales and ships, Baumgartner and his colleagues are testing a possible remedy.

On a Monday morning last summer, scientists from the Wildlife Conservation Society boarded the Morning Star, a thirty-five-foot downeaster out of Babylon, New York, to conduct a whale survey—something they do, weather and funding permitting, as part of long-term research on humpback genetics and song. After two and a half hours, the Morning Star stopped near a yellow buoy. The buoy, a collaboration between the W.C.S. and the W.H.O.I., contains a sophisticated hydrophone that eavesdrops on whales in the New York Bight, the roughly sixteen-thousand-square-mile region running from Cape May to Montauk. Whales seem to be increasingly using this habitat, perhaps because baitfish have become more prevalent. On its cruise, the Morning Star passed several patches of wavepoint, the grainy texture that darting baitfish weave on the water above them, and, close to Fire Island, a vast swath of water that shimmered and shook as if about to lift off—indicative of menhaden, a favorite humpback food. People are also increasingly using the habitat. “We have shipping lanes, and noise, and a wind-energy farm coming up,” Howard Rosenbaum, the leader of the W.C.S. group, said. “We wondered, What technology could we use to help?”

Since June, 2016, when the buoy went into the water, it has logged hundreds of fin, sei, humpback, and right-whale calls. “I am still awestruck,” Rosenbaum said. “We have learned more about whales than we could have imagined.” One insight has been that North Atlantic right whales, of which only four hundred and fifty or so survive, pass through the Bight at dangerous times, in dangerous locations. Listed as endangered in 1970, the species has been protected by seasonal-management areas since 2008: large vessels must slow in certain stretches of water when the whales are migrating, feeding, or giving birth. (This season, for the first time in two decades, no births have been recorded.) Data from the buoy shows that right whales are in the vicinity before and after New York’s seasonal-management area is in effect—and that they travel through busy shipping routes not included in its borders. “Human-caused mortality is the highest it has ever been for the North Atlantic right whale now,” Baumgartner said. “The New York Bight to the Chesapeake Bay is a real hot spot for whale strikes.”

Baumgartner, Rosenbaum, and their colleagues want to use the buoy to keep humans and whales out of one another’s way. Most marine recording devices are archival, placed in the water and removed months later, telling tales of whales gone by. The buoy in the Bight is one of a handful that also transmits data in almost real time. Its software, designed by Baumgartner, can identify fourteen tonal calls by four species. Once every two hours, the buoy transmits tracks, via satellite, to Baumgartner’s lab in Woods Hole, which forwards them a few miles down the road to Julianne Gurnee, an acoustics analyst at NOAA’s Northeast Fisheries Science Center, who vets the software’s take. An e-mail then alerts dozens of researchers, regulators, rescuers, and others; the findings are posted on the Web site Robots4Whales. Ultimately, the scientists want to get the alerts to boaters, to builders, to anyone making noise or moving fast in the Bight.

This especially includes the operators of the vessels that tower like steampunk cities as they move along New York’s three main shipping lanes. “There is great research over the past decade that shows that when large ships slow down, the chances of collision are reduced, and lethality is reduced,” Baumgartner said. The approach has worked in Stellwagen Bank National Marine Sanctuary, where liquid-natural-gas tankers approaching Boston Harbor are required to decelerate if a right whale calls. “We are all striving to find the balance between commerce and conservation,” Carleen Lyden Walker, the executive director of the North American Marine Environmental Protection Association, a shipping organization, told me. A team co-led by Baumgartner tested a similar system in the Coast Guard gunnery range near Nomans Land island, southwest of Martha’s Vineyard, where loud, fast boats conduct live-fire drills. The data led to a voluntary policy: no training exercises within three days of a right-whale alert. “No one wants to hit a whale,” Lieutenant Christopher Verlinden, of the Coast Guard Academy, in New London, Connecticut, said. “This is more effective than anything I have ever seen before.” Verlinden and his students are working to solve thorny challenges of data integration, location precision, and maritime communication that could allow the Coast Guard to track whales as it enforces regulations.

Last month, the research vessel Connecticut set out from Groton at six o’clock in the evening, heading for the buoy in the Bight. The instrument had ceased transmitting in early December—more than nine months after Baumgartner had anticipated the batteries would run out. The ship arrived at first light on February 13th, but heavy gusts and high waves thwarted work until the afternoon. Even with the calmer weather, pulling aboard the yellow buoy was back-wrenching work: beneath the floating portion at the top was a hundred feet of sea-life-encrusted stretch hose and a heavy metal frame. “The mussels were six to eight inches thick,” Jeff Pietro, an engineer with E.O.M. Offshore and the W.H.O.I., said. “The pressure washer didn’t do anything. We had to physically scrape those things.”

The old buoy’s batteries, it turned out, were still good. Transmission had stopped because the flash drive was full. The refurbished device got to work that evening, and Baumgartner, Rosenbaum, and their team have funding to operate it for another year. Besides recognizing and transmitting fin, sei, humpback, and right-whale vocalizations, the buoy will continue to archive calls by the region’s other three whale species—the low-frequency songs of blue whales; the knocking, click-like calls of sperm whales; and the lowing, buzzing of minke whales. Even now, somewhere in the Bight, deep out of sight, whales are singing.