A humpback whale became entangled in an anchor line on a small cruise ship in southeast Alaska, getting stuck for roughly 12 hours while federal authorities and the boat's crew worked to free it.

NOAA Fisheries says ultimately the anchor chain was cut in hopes the whale could wriggle loose. The chain was wrapped around the whale's lower jaw.

The agency says the team saw a whale, believed to be the one that had been entangled, swimming away.

NOAA Fisheries says whales were bubble-net feeding near the anchored ship south of Juneau early Sunday when one hit the boat and got wrapped in the anchor line.

Agency spokeswoman Julie Speegle says the ship's crew appropriately responded to the entanglement.