A humpback whale entangled in fishing gear off the coast of western Canada was caught on video pulling off a spectacular maneuver to free itself as rescuers worked to help the sea creature.

The ocean mammal was caught in the ropes of a buoy used to catch prawn for two days when rescuers caught up with the whale near Texada Island on Oct. 14, Fisheries and Oceans Canada said.

The department’s Marine Mammal Rescue team was following the distressed whale when its aerial drone spotted two more humpback whales swimming alongside the creature.

Before rescuers attempted to cut the rope that was caught in the animal’s mouth, they added some drag to slow the whale down, Paul Cottrell, with Fisheries and Oceans Canada, told the BBC.

VIDEO CAPTURES BREACHING HUMPBACK WHALE NEARLY LAND ON FISHING BOAT OFF JERSEY SHORE

humpback whale caught in fishing gear swimming

Rescuers located the whale off the coast of western Canada near Texada Island. (DFO MM Response via Reuters)

The whale appeared to sense the additional drag, according to Cottrell, and what happened next left the rescuers stunned.

humpback whale beginning a backflip

The whale surfaced and did a backflip to free itself after rescuers added drag to the the rope that was caught in the animal's mouth. (DFO MM Response via Reuters)

Drone video shows the humpback whale spyhopping, meaning the whale puts itself in a vertical position in the water before doing a backflip.

"And all the gear came flying out and the animal took off with its companion animals," Cottrell said.

three humpback whales swimming

The newly freed humpback whale swam away with its two companions. (DFO MM Response via Reuters)

Rescuers continued to follow the trio with its drone to make sure the whale was completely free of the gear. Cottrell described the whale as "energetic" as the creature swam away with its companions.

CLICK HERE TO GET THE FOX NEWS APP

Humpback whales can measure up to about 60 feet long and weigh up to about 40 tons, according to the National Oceanic and Atmospheric Administration (NOAA).