Local officials believe tens of thousands of fish in New York's Shinncock Canal died of hypoxia. (Brewster Minton via Storyful)

Residents of Hampton Bays, N.Y., awoke Monday morning to find their local canal clogged with tens of thousands of silvery, dead fish. The bodies were packed together so tightly that it looked as though you could walk across them, one man told the local news channel News12. The air was thick with their noxious smell.

This was a classic fish kill — a massive die-off that occurs when too many fish are in a body of water with too little oxygen. Under ordinary circumstances, fish extract oxygen that has been dissolved in water as it filters through their gills. When the amount of dissolved oxygen is insufficient, the fish become hypoxic — they suffocate and die.

The New York Department of Environmental Conservation issued a statement saying the closing of locks at Shinnecock Canal early Monday inadvertently trapped a large school of Atlantic menhaden — small silvery fish also known as bunker — in the canal. The school of normally saltwater fish had probably been chased into the canal by predators.

“They chased them in here, but unfortunately the locks are closed so it’s just a dead end, they can’t get out,” Chris Paparo, a lab manager at Stony Brook University Marine Sciences Center, told the New York Daily News. “And with the sheer number of fish in here, it just sucks the oxygen out of the water and they suffocate.”

This isn't Shinnecock Canal's first fish kill. The Daily News reported that the tiny waterway has seen others caused by algae blooms. In these die-offs, vast films of algae covering the water's surface suck up the available oxygen, leaving none for the fish. (Though algae photosynthesize during the day, exhaling oxygen, when the sun is down, they can consume oxygen.)

Low dissolved oxygen can also result from high temperatures (warm water can't hold as much dissolved oxygen), poor circulation of water (to the despair of many a fish-tank owner — and their fish) and large amounts of other dissolved minerals in the water.

Read more:

This 6,000-year-old amulet is the oldest example of a technology still used by NASA

Scientists are building a telescope to seek another Earth — and you can help

Women have more rights in places with fewer pathogens

Watch rats 'giggle' and jump for joy at being tickled

Dear Science: Is listening with ear buds bad for your ears?