WAILUKU, Hawaii (AP) — A humpback whale spotted near Maui has been freed of braided line caught in its mouth.

A joint statement from state and federal agencies says the entangled whale was freed on Friday.

It was first spotted on Thursday by the captain of a fishing vessel. Rescue teams then went to the scene and began to remove the more than 285 feet (87 meters) of braided line that the whale was trailing.

The agencies say the whale was active on Thursday, and with sunset approaching, crews put a tracking buoy on the line and came back to finish the job on Friday.

The agencies say the whale has an excellent chance of survival. It was found off Makena Beach.

The gear will be analyzed to determine where it came from.