Federal officials say a yearling humpback whale off Hawaii has been freed from a life-threatening entanglement in mooring gear.

The National Oceanic and Atmospheric Administration said a rescue team cut off about 140 feet of line and a plastic trawling buoy when they freed the whale off Maui on Wednesday.

The whale’s tail and fins were wrapped in small-gauge line with the plastic buoy floating behind, the agency said in a statement.

Officials said the whale was in good condition but that the line wrapped around its tail had begun to cut into the animal’s flesh. The gear was of “considerable weight,” the agency said.

The gear will be analyzed to determine its exact source.

“The animal’s behavior was very evasive, and while it stayed near the surface, it maintained unusually rapid speeds, at times in excess of six knots,” the agency said in a statement Thursday.

Trained responders cut the gear off with a blade attached to a pole after getting close on an inflatable boat. It is a federal crime to approach a humpback whale and the team was working under under federal permit.