A challenging rescue operation in Russia’s Far East was declared a success after four orcas, including a pup, were freed from an ice trap in the Sea of Okhotsk off Sakhalin Island.

The killer whales’ plight triggered a unique eight-hour rescue mission, which was carried out by the Russian Emergencies Ministry with the help of a local fishing company. As the bay where the orcas got stuck was shallow and filled with ice and rocks, a traditional fishing boat was enlisted for the job, in place of a rescue vessel.

Rescuers used hooks to move pieces of ice out of the way of the animals, but they turned out to be no match for the largest chunks. Undeterred by the obstacle, however, they used some ingenuity and attached a thick rope to a vehicle on the shore that towed the bigger slabs of ice out of the path of the whales.

A separate team got into the water to show them the way to freedom.

The three smaller orcas were rescued first. Rescue workers needed to clear additional ice to help the fourth and largest whale, which was around 7 meters long, the local emergencies ministry said in a statement on Wednesday.

“The rescuers and volunteers that stayed near the animal at night covered it with tarpaulin to reduce heat loss and pushed away the ice floes that could hurt it,” the statement said. “At around 6 am local time, the rescue operation successfully ended. Willy [the fourth killer whale] reached the open sea,” the ministry said.

One of the killer whales almost drowned during the mission when it got stuck underwater and could not float up for air. Thankfully, rescuers were able to successfully turn the whale around, giving it access to oxygen.

The largest whale had open wounds, so the rescuers gave it a shot of adrenaline and applied vaseline to its injuries.

Orcas can survive three days without food, but only if they remain in the water and have access to air.