A juvenile humpback whale that made an errant visit and got stuck in Katama Bay on Sunday afternoon is believed to be okay and swimming the ocean. A group of Islanders, with help from the staff of the New England Aquarium, were able to monitor and eventually see the whale as it swam out into Nantucket Sound late Monday morning.

The 20-foot-plus whale, weighing 10 tons or more, was first spotted on Sunday afternoon by staff of The Trustees of Reservations at Norton Point. At the time it was thought the marine mammal was entangled and in distress in Katama Bay.

Coincidentally, at the time of the report staff from the New England Aquarium were finishing up a presentation and class on marine mammal and sea turtle stranding and response training at Sailing Camp Park in Oak Bluffs. More than 30 Vineyarders attended.

Kate Sardi, a senior biologist with the aquarium, said they got the report and headed for Katama Bay. The animal was sighted about 500 yards from the beach in the bay. From the shore, Ms. Sardi said: “It was obvious that it was a humpback whale, and it was obvious it was in some kind of distress, for it wasn’t moving at all.

“We jumped onto the shellfish constable’s boat and headed out to evaluate,” Ms. Sardi said. She said the animal appeared stuck on a sandbar and wasn’t entangled in any lines. “The water depth was four feet, and we were pretty close to high tide,” she said. But dark was setting in. She said she worried about the animal suffering through the night as the tide went down.

David Grunden, Oak Bluffs shellfish constable and a coordinator for the Vineyard’s marine mammal stranding network, said it is hard to tell how the whale got into Katama Bay, though the opening at Norton Point Beach was a distinct possibility. “We’ll never know,” he said.

Ms. Sardi said the whale was either a year or two old. It may have been a young-of-the-year infant, separated from its mother. She said if it were a baby, it was born in January or February in the Caribbean. “They stay with their mother for a full year. The earliest weaning for a calf takes place in October,” she said.

She said juveniles start practicing feeding while they are still weaning. There was concern whether this animal was too young to live on its own. Juveniles a year old would be okay, as they are known to wander.

On Monday morning at 6 a.m. the team headed back out into Katama Bay to see if the whale survived the night. They couldn’t find it.

“We were elated that it wasn’t where we left it,” said Mr. Grunden. They searched the pond. “Sometimes if they are suffering from a trauma or sick they will get stranded again,” Ms. Sardi said. When they were about to take a break from the search and return to shore, word got to the group that the whale had been seen not far from the Edgartown Lighthouse.

They were back out on the water looking at 9 a.m. Fishermen on the beach near the lighthouse pointed out to where they saw the whale.

The whale was found at about 10 a.m. in waters off Chappaquiddick, more than 300 yards from the Norton outermost house with a windmill.

Paul Bagnall, shellfish constable for Edgartown, operated the boat. Kerry McNally, a biologist with the aquarium, and Danielle Ewart, Oak Bluffs shellfish constable deputy, were also aboard. Mr. Grunden and his wife, Sharry, acted as spotters. Mrs. Grunden repeatedly demonstrated she could spot the whale when it surfaced before anyone else.

Spotting the whale was difficult, as the wind from the southwest was kicking up seas and forming white caps. Each time the whale came up to spout, it surfaced for a few seconds and then plunged deep quickly. The whale spent a lot of time underwater, and surfaced as little as two to four minutes and as much as 11 to 12 minutes.

The whale’s behavior was positive. “He was breaching and lobtailing. Young animals tend to be very active. Like any species, they are more playful, and that was a good sign. He had energy and he wasn’t lethargic.”

Minutes before disappearing for good, the whale slapped the surface of the water with its tail and lobtailed, making huge splashes that were observed several hundred yards away.

“It is an extremely rare case that a large whale gets grounded and survives,” Mr. Grunden said.

That was Ms. Sardi’s concern; she said a heavy whale can do significant damage to itself if it is stuck on land. “The weight can damage the internal organs . . . there is a chance something can go wrong. They are so heavy.”

Based on the whale’s behavior off Cape Pogue, however, “We are tentatively optimistic,” she said.

Edgartown harbor master Charlie Blair said he believes the visitor was a lucky whale. With all the mooring lines in the harbor, the obstructions, all the opportunities for grounding, he said he is surprised the animal managed to stay out of harm’s way. Through the years Edgartown harbor has been a host to visiting pilot whales and dolphins, but never a whale that he can recall.