Marine scientists say the massive operation to rescue two humpback whales yielded valuable information about the endangered species — even though they will never know why the pair swam 90 miles inland, or what caused them to suddenly reverse course.

More than two weeks after they were first spotted far up the Sacramento River, the wayward whales appeared to have finally found their way home.

Since the humpbacks had not been seen for a full day, officials said Wednesday they assumed the pair had returned to the open sea, undoing a wrong turn that drew thousands of admirers and a range of rescue attempts.

• Click here to visit FOXNews.com's Natural Science Center.

"We are very happy with the outcome of this rescue operation," said Scott Hill, a division manager for the National Oceanic & Atmospheric Administration. "You couldn't have scripted a better outcome."

The intense operation to move and monitor the whales, which involved 34 government agencies and nonprofit groups, was officially suspended Wednesday evening. But officials said they would not be ready to celebrate until Sunday, when they could be more certain the humpbacks were safely on their way.

The unpredictable duo, believed to be mother and calf, were last observed at sunset Tuesday swimming in San Francisco Bay about 10 miles north of the city.

Officials believe the whales slipped out of San Francisco Bay to the open sea late Tuesday night or early Wednesday morning, when no one was watching.

"It was rather inconsiderate of them," joked Frances Gulland, a veterinarian with the nonprofit Marine Mammal Center.

To make sure the whales did not take another wrong turn, two government boats were launched Wednesday morning to look for them in the Pacific Ocean, Fees said. Rescuers relied on reports from commercial vessels and Coast Guard patrols to determine if the humpbacks still were in the bay.

But the only whales anyone saw were a pair of gray whales near the Golden Gate Bridge, Hill said.

Officials said they gained much new knowledge about humpbacks during the unprecedented rescue effort.

It was the first time the same humpbacks were studied in the wild for so long, according to Bernadette Fees, deputy director of the California Department of Fish and Game. It also was the first time that whales swimming free in the wild were successfully treated with antibiotics.

The pair were injured by a boat sometime during their wayward journey, and officials said their wounds may have played a role in their getting stranded in the fresh water of the Sacramento-San Joaquin River Delta.

Based on the way their skin deteriorated while in the delta, marine scientists now have a clearer idea of how long whales can survive in fresh water, Gulland said.

After the whales were spotted near Sacramento on May 13, officials spent days trying to goad them back to the ocean, playing recordings of other whales, surrounding them with boats, blasting them with fire hoses and banging on metal pipes dangling beneath the water.

Rescuers said they did not know if the various methods had hastened the whales' exit or hindered it.

"What we ultimately came away with is that many of the techniques had some effect, but none of them could make a whale go in a direction it did not want to go," said John Calambokidis, a scientist with the nonprofit Cascadia Research Collective.

They speculated Wednesday that antibiotics given to the whales on Saturday to try to slow the damage from their wounds may have marked a turning point, since the pair began their hasty retreat from the delta after that.

Biologists said the saltier water where the mother humpback whale and her calf had been swimming since leaving the delta helped reverse some of the health problems caused by long exposure to fresh water.

Officials were unsure how much was spent on the rescue efforts, but they insisted the expenditures of time and money were justified, if not required, under wildlife protection laws.

They urged people who were captivated by the whales and followed their progress to transfer that energy to protecting marine habitats.

All the attention lavished on the whales "shows how important marine mammals are to the American public as stewards of the environment," said Teri Rowles, the lead veterinarian at NOAA.

Research teams already studying whales in the Pacific Ocean planned to keep tabs on the pair to see if they suffer any long-term health effects from their ordeal, Calambokidis said. Skin samples from the two will be analyzed to determine if they belong to the class of humpbacks that migrate off the coasts of Mexico and California.

Hill said biologists theorized the humpbacks' next stop might be the Farallon Islands, located 27 miles offshore of San Francisco, where other humpbacks already are feeding.

Biologists originally had planned to attach a satellite tracking tag to the mother humpback, but gusty winds and malfunctioning equipment stymied them.

Distinct markings on both whales' tails were photographed so they could be identified in the future, and scars from the gashes on their sides are likely to be with them for life, Gulland said.

"Everyone hopes these animals die of old age," she said.

They might even make another inland trip someday. Humphrey, a humpback that famously strayed into San Francisco Bay in 1985, reappeared there five years later.

"If we learned anything about these two, it is that they will do what they do when they want to do it," Fees said.