Video of dozens of orca and beluga whales being held in a small pen near the Russian far east city of Nakhodka sparked outrage earlier this year.

The whales were reportedly captured last summer and herded into pens in the Pacific Ocean, apparently awaiting illegal sale to marine parks in China.

Several have since disappeared and may have died. Others appear to be sick.

And activists have been trying for months to get the Russian government to step in and rescue the whales from what they're calling a "whale jail."

Related: The Northern right whale, already an endangered species, is in deep trouble

Those efforts may now be paying off. Russian authorities recently brought charges against four companies and this week signed an agreement with a group of international marine activists and scientists to try to return the whales to the wild.

The group includes Jean-Michel Cousteau, son of the famed marine explorer Jacques Cousteau.

Cousteau says the goal is to release all 97 of the whales still in captivity in Nakhodka.

But activist Charles Vinick, who's also part of the effort, thinks that won't be quick or easy.

"We have to understand the health condition of each whale. ... We also have to look at where it is appropriate to transport them so that they can be having the best opportunity to have food, and guidance of older adults." Charles Vinick, whale activist

"We have to understand the health condition of each whale,” Vinick says. “We also have to look at where it is appropriate to transport them so that they can be having the best opportunity to have food, and guidance of older adults."

The "whale prison" holds nearly 100 whales, including orcas and belugas. Credit: Alexander Safronov/Handout via Reuters

That guidance is key for social animals like belugas and orcas, especially ones that were captured when they were young.

Vinick helped lead the effort to release the captive orca Keiko in 2002. (Keiko portrayed the orca Willy in the 1993 film "Free Willy.")

His release was widely publicized but ultimately unsuccessful: Scientists say Keiko never learned to properly socialize with other orcas or find his own food, and he died after about 18 months back in the wild.

Related: Japan to resume commercial whaling after pulling out of IWC

So the challenge of rehabilitating and freeing the 97 whales in captivity in Russia is a big one.

The activists say they don't yet have a plan for reaching that goal, although the Russian government has promised to build a rehab facility for captive or injured whales as part of this week's deal.

This story includes material from Reuters and AFP.