In late July, a stretch of the Rio Grande ran dry due to extreme heat and drought. It was the first time in four decades that the Rio Grande dried up in Albuquerque, New Mexico. For several days, only a smattering of pools remained—spelling potential disaster for an endangered species of fish.

Biologists walked the mostly-dry riverbed to scoop up endangered Rio Grande silvery minnows, which are iridescent, pinky-sized native fish only occupy seven percent of its historic range. The silvery minnow was once plentiful throughout the Rio Grande but its population declined as the waterway was dammed and channeled. The fish was listed as endangered in 1994.

“They’re adapted for a lot of conditions but not to figure this out,” U.S. Fish and Wildlife Biologist Thomas Archdeacon told the Associated Press. “When you have flow one day and no flow the next for miles, they don’t know how to get out of that.”

Archdeacon and his colleagues used hand nets and seines to gather the minnows from the puddles and transport them to parts of the river that still had water. The stress of the whole ordeal is hard on the fish, and the biologists estimate that only 5 percent of the fish they relocated will survive.

Typically, New Mexico would be able to send more water into this stretch of the Rio Grande from a reservoir upstream. But the state was unable to store extra water this year because of a downstream debt it owes Texas as part of a water-sharing agreement. After three years of extreme drought conditions, all other nearby reservoirs are also too low to contribute, despite residents of Albuquerque following strict water restriction rules and state agencies paying some local farmers to keep fields fallow. 

Read Next: Researchers Capture First-Ever Photos of Mountain Lions Preying On Feral Burros

In the last week, summer storms have flushed water back into the stretch of the Rio Grande. Officials have not said what the overall impact of the recent drying incident on the Rio Grande silvery minnow population will be.