STATEN ISLAND, N.Y. -- Time was running out for a humpback whale, trapped in a commercial fishing net, when Sal Gatto and his fishing buddies came to its side.

The Staten Island friends were off the coast of Ocean County, N.J., Saturday morning, fishing for striped bass when they saw a mass of net and rope.

"We thought at first it was debris, but as we got closer to it, we noticed it was a humpback whale in a lot of stress," Gatto, of Dongan Hills, told the Advance.

The majestic creature was about 40 feet long and looked as though it had been drifting for as long as two days, Gatto said.

Check out the video below of the close-encounter.

Gatto and his friends Frank Noto and John Mosca had seen humpback whales on their fishing trips before, but never before in this much distress. They were about half a mile from the shore.

"With the way the tide was, it wouldn't have been long before it beached itself."

The fishers called in the Coast Guard, but it would be another hour before they could get there. So Gatto, Noto and Mosca got their boat close to the whale and started cutting the net.

"We knew this whale didn't have a chance -- it was on its way out," Gatto said. "We just started grabbing the lines and cutting them. It took us the better part of an hour."

At one point, the whale rolled over, its giant eye looking straight at Gatto.

"My friends thought maybe it died, but I knew it hadn't because it was looking right at me," Gatto said.

"I could sense this higher level of intelligence. It's almost like it knew we were helping it."

When the Coast Guard arrived, they let Gatto and his friends continue cutting, since they were positioned close enough to the whale. The Coast Guard confirmed that they responded Saturday.

As the ropes began to fall, the whale let out a deep breath, then swam away.

"We sort of felt like heroes," Gatto said.