WAILUKU, Hawaii -- An adult 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 Friday.

It was first spotted on Thursday by the captain of a fishing vessel. Rescue teams then went to the scene.

Get Breaking News Delivered to Your Inbox

A small inflatable craft was used at first to approach the animal, reports CBS Honolulu affiliate KGMB-TV. The rescue teams began to remove the more than 285 feet of braided line that the whale was trailing.

Humpback whale is seen swimming in waters off Hawaii with 285 feet of rope caught in its mouth on January 11, 2018 NOAA / KGMB

The agencies say the whale was active Thursday, and with sunset approaching, crews put a tracking buoy on the line and came back to finish the job 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.

NOAA reminds people it's illegal to approach a humpback whale within 100 yards by sea, and within 1,000 feet with an aircraft, according to KGMB.