When a whale entangled in a fishing net beached itself off the coast of Sri Lanka, soldiers at the local army base snapped into action. 

Together with local fisherman and villagers, the soldiers were able to help the 70-foot leviathan become untangled on the beach, according to an army press release, which also provided these incredible photos. 

The whale had apparently gotten snagged by the net and was struggling to swim back out to sea. Heavy winds and rough seas drove it back toward the shore until it eventually beached. 

Rescuers brought in backhoes, which along with a team of volunteers in the water, were able to dismantle the netting. It took roughly eight hours to remove the netting piece by piece until finally the whale was free to swim back out to sea.

The exact type of whale was not mentioned, but based on the photos and size it is likely a blue whale. In a related story, earlier this year a blue whale off the coast of California trailing a crab fishing line was unable to be helped before it swam south.

Photo credit: Sri Lanka Army