Scientists in Southern California have discovered a mysterious booming population of endangered desert pupfish in man-made research ponds designed for an entirely different purpose.

Although no one knows exactly how they got there, the fish probably took a 1.5-mile joyride through the piping used to deliver water to the ponds.

Last year, Douglas Barnum, a scientist with the U.S. Geological Survey’s Salton Sea Science Office, and his colleagues built four small ponds to study how ongoing changes in the Salton Sea—the largest lake in California, which is 25 percent saltier than the ocean—will affect nearby wildlife as part of the state’s ongoing Salton Sea Restoration Project.

The Salton Sea, an important habitat for migratory birds , is slowly drying up and growing saltier. It is also becoming tainted with selenium as it is fed by a number of rivers, including the Alamo River, contaminated by selenium from the upper Colorado basin.

The element, which may be leaching into the basin from agricultural sites, can be toxic to wildlife, especially as it accumulates through the food chain.

“The birds are potentially eating a very toxic time bomb,” Barnum told LiveScience.

To study how birds respond to the growing selenium levels as well as the changes in salinity, the scientists created man-made ponds, mixing the salty water from the Salton Sea with water from the nearby freshwater Alamo River to create a series of four ponds of varying salinity, all slightly contaminated by selenium.

The plan was to study how bird populations respond to the different ponds, which are all carefully filled so as to prevent fish and other wildlife from being pumped in too. The water first travels through a trench with a rock barrier and then continues through one and a half miles of piping until reaching the ponds.

It was therefore surprising when Barnum and his colleagues noticed a number of larger fish swimming around in the ponds this year.

They assumed that all of the fish were a common species known as tilapia and that they had somehow survived the long trip from the lake or river to the ponds. But when they started doing some maintenance work a few weeks ago, they “noticed something that was a little bit odd,” Barnum said.

They saw smaller fish in the ponds, too.

“These were not Tilapia, and they didn’t look like anything else we had seen,” Barnum said.

The tiny fish, they discovered, were actually endangered desert pupfish—populations of which have declined over the course of the past few decades thanks to a loss of habitat and changes in environmental conditions, such as dam-building, according to the U.S. Geological Survey.

The scientists estimate that there are thousands of these endangered fish living in the research ponds, although most of them are young, and no one knows how many will survive into adulthood.

They also aren’t sure whether the pupfish are coming from the Salton Sea or the Alamo River, but it’s likely that they somehow made it through the rock barriers and made the voyage through the piping.

Young pupfish are smaller than a fingernail, so “they may be able to make it through the cracks in the rocks,” said Barnum. “It doesn’t sound possible, but who knows.”

He added that it only takes two pupfish—a male and a female—to start a population. While it could be that pupfish are more prevalent in California’s rivers and lakes than anyone realized, it may also be that a few brave individuals just happened to make it to the ponds and, upon their arrival, mated like mad.

This exciting windfall has prompted the scientists to try to broaden their research goals to include studies of the elusive pupfish as part of their project.

“Let’s take advantage of this golden opportunity to learn something about this endangered species,” said Barnum.