LUBEC, Maine — A number of local people tried to save a 24-foot long basking shark that washed up on shore Wednesday morning in Lubec. Unfortunately, the shark died later in the day.

Carol Dennison, chair of the Lubec select board, said she and her husband, Captain Ralph Dennison of Downeast Charter Boat Tours, heard about the shark at about 7:30 a.m. Wednesday.

“We went out there right away,” she said, adding she heard from others that the shark had been washed up on a sandbar at the Lubec Narrows since about 5 a.m.

Whale biologist Chris Slay, a summer resident of Lubec, said the wife of a local fisherman came up with the idea to pour water over the shark’s gills in an effort to keep it alive.

“We thought, well, you know, it’s worth a try,” he said.

Amy Knowlton, a biologist with the New England Aquarium’s Bay of Fundy Right Whale Field Station in Lubec, said the efforts of the “bucket brigade” continued for several hours.

Dennison said that at first the shark moved when the water washed over its gills. But it did not survive.

“We stayed ’til the end, ’til the water came up back over its fins,” Dennison said. That was at about 10 a.m., when the tide was rising.

Six people with the New England Aquarium brought a boat in to try to tow the shark out into deeper water in hopes that it might come around, said Knowlton.

“Sadly it had died by that point,” she said.

The crew secured the shark’s body near the shore so that a necropsy could be performed first thing Thursday morning during low tide, according to Knowlton.

“We towed it off the beach so it’s not a nuisance to town,” she said.

About 10 people will work for four to five hours to try to determine why the shark washed up on shore and why it died, Knowlton said.

After the necropsy, the shark remains will be cut loose and allowed to decompose naturally at sea.

Basking sharks are common in New England waters, Knowlton said. But seeing one beached “is not typical,” she said. “It’s very rare.”

Sgt. Colin MacDonald of the Maine Marine Patrol said his organization was informed but did not respond.

“We typically don’t respond to those sorts of things,” he said.

Shark sightings are not uncommon in Maine, according to marine scientists. Besides the ubiquitous dogfish and basking sharks, other types that have been seen off Maine’s coast over the years, including porbeagles, sand, tiger, mako, thresher and blue sharks. A few great whites also have been spotted in the Gulf of Maine in summer.