After spending years in the ocean, the alewives and blueback herring had at last found their way back to the Chesapeake, and were slowly working their way upstream against the Choptank River current.

Like their ancestors for thousands of years, instinct drove their migration the spawning grounds where they had been hatched years earlier and would release eggs and sperm for a new generation.

And, like the migrations of their ancestors, the journey was largely unseen by humans.

Until — blip! — a white speck popped up in the cone-shaped swath of river visible on Matt Ogburn’s computer screen. Then — blip! — another. And another. And then more.

The images were sound waves bounced off fish by a sonar device at the edge of the river. It’s not exactly high definition, but the swimming fish are clearly visible on the screen.

“The fish are the bright things that are moving,” said Ogburn, a researcher at the Smithsonian Environmental Research Center in Edgewater, MD.

While the images may be a bit fuzzy, they are helping scientists get a clearer picture on the size of the alewife and blueback herring spawning run.

Collectively known as river herring, the two small fish were once one of the most abundant anadromous fish in the Bay and along the East Coast. In some rivers, their spring migrations are thought to have numbered in the hundreds of millions — and maybe more.

But river herring have suffered a spectacular population drop, estimated at more than 99 percent in recent decades, a result of overfishing by large offshore fleets in the 1970s, loss of spawning habitats because of dams and other obstructions, pollution and other factors.

The drop-off was so great that in 2011, the fish were proposed for protection under the Endangered Species Act. After a review, the National Marine Fisheries Service decided not to list the species because they were not in danger of becoming extinct.

But the Atlantic States Marine Fisheries Commission, which considers river herring “depleted,” two years ago closed almost all of the rivers on the East Coast, including all Bay tributaries, to river herring catches. The commission, which regulates the harvest of migratory coastal fish, also wants states to collect better information about river herring.

River herring have often been overlooked as agencies have tended to focus more attention on their larger cousins, shad. Although they once supported massive fisheries, many conservationists today are interested in seeing river herring populations restored because of their importance to aquatic ecosystems.

“It is a really important prey fish that myriad species depend on, and it was not being well-served by the management,” said Anthony Chatwin, director of marine and coastal conservation for the National Fish and Wildlife Foundation.

The NFWF, a nonprofit created by Congress to help fund conservation efforts, in 2009 launched a 10-year, river herring program to fund efforts along the East Coast to help improve habitat, protect existing populations and support research and monitoring.

In the mid-Atlantic, the organization concluded that the most important need was simply getting a better spawning run estimate, for which data was “largely absent,” Chatwin said. But getting that data was also more difficult than in some other areas.

“We can do visual counts in northern New England, but you can’t do them here,” he said. “The coastal rivers are a lot murkier.”

The solution proposed by SERC, and supported by the NFWF, was to use sonar to put “eyes” in the water, which was also a technique used in Alaska to count salmon.

But it’s both labor intensive, and expensive. SERC began using the devices on both the Choptank and the Marsyhope, a Nanticoke River tributary on the Eastern Shore, last year.

The sonar equipment collects and stores data during the spawning runs of both species which, together, can span a couple of months. Biologists examine the recorded images on their computers, though they only count fish for 10 minutes out of every hour of data — the same protocols used for salmon monitoring in Alaska — but that’s still a lot of hours looking at blips on a computer screen.

“It takes a long time to process these data, so we have a little bit more to get what is going to be our best estimate,” Ogburn said.

It looks like the data will show between 100,000 and 300,000 alewife and a similar number of bluebacks passed the sonar, located on a stretch of river about 40 feet wide near Goldsboro. The numbers at Marshyhope were similar.

And that’s last year’s data. This spring’s run is still being examined.

But the data also revealed a big surprise. While the entire spawning run took place over the course of a month, most of the blueback herring passed the site on two consecutive evenings, when they swam by at the rate of about 25,000 fish an hour.

So about two-thirds of the entire blueback herring run passed by in about eight hours.

Had there been no monitoring during those times, the bulk of the run would have gone unseen. “It is very episodic,” Ogburn said. “Some days there are a lot, some days there are a few.”

As they continue to review the data, Ogburn and colleagues will try to determine if weather or other factors seem to explain fluctuations in fish numbers. “We don’t know if it is like that each year,” he said.

The finding has potentially huge implications for more traditional monitoring programs.

Eric Hilton, a fisheries scientist at the Virginia Institute of Marine Science, saw a presentation of the sonar results and said they were both impressive “and kind of scary for those of us going out once a week, or a couple times a week, trying to characterize the spawning run. But we do get different types of information, I think.”

Ogburn, Hilton and other fisheries scientists were at a meeting this spring that was organized by the NFWF to start planning a Baywide river herring monitoring strategy.

Sonar devices can’t be used everywhere. They’re too expensive — they cost about $80,000 each — and can only be used in relatively narrow rivers, typically less than 100 feet wide.

In addition, biologists still need to make weekly trips to the stream to conduct electroshocking surveys to complement the sonar data. Biologists can’t always distinguish between fish species when looking at the computer screen, and the electrofishing data lets them know the actual species composition, and their sizes, each week.

But, Ogburn said, the new insights gleaned from the data so far prove the value of the effort. “We think it is really important, at least for a few streams, to know exactly how big the run is,” he said.

Ogburn said he envisions a monitoring strategy that uses sonar in a handful of streams to get very precise estimates, coupled with more widespread traditional river sampling, which offers a better idea of the presence and absence of river herring over a broader area, as well as trend information.

“Presumably, as the population increases, they should show up in more places, and if the population decreases, they will disappear from some places,” he said.

Chatwin said he hopes the final monitoring strategy will be embraced by fish management agencies around the watershed, and that the NFWF might be able to fund some start-up costs. He’s also optimistic that new technologies will help biologists be able to better identify fish on their computer screens, reducing some of the labor.

But, he said, better data is essential to help the fish recover. New England, he said, has the best river herring monitoring and has also attracted investments from the NFWF and others to help improve habitat, in part because they are able to collect data to show whether those efforts are working.

“What we have found is that monitoring of river herring is key to channelizing successful and effective conservation investments,” he said.