PLYMOUTH — The two kayakers who were attacked by a great white shark near a group of seals Wednesday evening found themselves at the mercy of two interlocking trends — the surging seal population in Cape Cod Bay and a corresponding rise in the number of predatory sharks that feed on them.
Both populations have steadily rebounded in recent decades thanks to conservation measures, marine specialists say. And Cape Cod Bay, where large seal colonies are drawing more sharks closer to shore, is at the center of the resurgence.
“White shark populations are on an upward swing,” said George Burgess, who directs the Florida Program for Shark Research. “And the seal colonies are magnets.”
Greg Skomal, a senior fisheries biologist in the state’s marine fisheries division, said as the seal population has burgeoned, the animals have spread to new areas, bringing along the sharks into less familiar waters.
“As they grow, they expand to find areas that are suitable,” he said. “And the sharks follow.”
That brings them closer to shore, he said.
Sharks are highly migratory and range as far north as Canada, specialists say. In July, tourists on a whale-watching tour spotted a white shark a short distance from a harbor near St. Andrews, New Brunswick.
Skomal said sharks, which are in constant movement, are probably swimming all along the coast of Massachusetts.
The attack, from which the two women escaped unscathed, came a week after a rare white shark sighting in Duxbury and a previous sighting in Chatham. Plymouth officials closed public beaches for swimming, and said the incident reveals a growing, and unsettling, shark presence.
“This is our notice that they are here,” Plymouth harbormaster Chad Hunter said. “It’s definitely eye-opening.”
The great white capsized the two kayaks near Manomet Point and bit into one of the boats. The tooth punctures and bite radius confirmed it was a white shark. Crews were searching for the shark Thursday but by late afternoon had seen no signs of it.
Hunter said seals appeared to have taken up year-round residence in Plymouth, and groups of 10 to 20 can be seen sunning themselves along the coast. To the ravenous shark, the dense populations are like a buffet.
“Once a shark cues in on that, and knows that food is available, that’s probably going to be a place of interest,” Hunter said.
The kayakers had paddled out to see seals, which officials Thursday strongly cautioned against.
“We strongly urge people to keep an eye out for seals while at the beach or on the water, as sharks may be nearby,” state environmental officials said in an advisory. “Avoid swimming at dusk or dawn, in very deep waters, or in areas of seal congregation.”
As shark sightings have become more common, the odds of human encounters with them increase. In 2012, a swimmer was attacked by a white shark off the coast of Truro, the first person to be attacked by a white shark in Massachusetts waters in more than 70 years.
Since white sharks became federally protected in the late 1990s, their ranks have climbed to about 70 percent of historic levels, specialists said. Seal populations also have increased since they became protected in the 1970s.
“If seals are allowed to come back to where they once were, you can expect to see more white sharks as well,” Burgess said.
Burgess said the shark either mistook the kayak for a seal or, more likely, took an “investigatory” bite to see what it was.
The attack prompted a frantic 911 call from the kayakers, who were knocked into the water by the impact.
“I was just on the boat with somebody. We are stuck on the boat,’’ one woman told a 911 dispatcher, her voice tinged with fear. “And there is a shark!”
When asked if she saw whether she was hit by a shark, the woman said “it was an [expletive] great white.’’
The woman and her friend repeatedly ask when help will arrive. “We are on the way,’’ the dispatcher said.
The women were about 150 feet from shore. They were in the water about 15 minutes when the harbormaster and his crew took them from the water.
Hunter said the women were so terrified they could not immediately explain what had transpired. Hunter said officials realized what had happened when they saw the bite marks on one of the kayaks.
After the women regained their composure, they described what happened.
“All of a sudden one [kayak] was sort of pushed up, like something hit the bottom of the kayak, and it capsized,’’ Hunter said. “They saw the shark. The pointed head. The eye. The gills.”
On Thursday, onlookers gathered on Manomet Point in hopes of a glimpse of the shark.
“You’re shocked when you hear it,” Christine Gleason said. “I kayak near here and you don’t realize how close it can be.” Gleason said she would think twice about taking her kayak out this week.
“You expect to hear this kind of news in Chatham but not in Plymouth,” she said.Globe correspondent William Holt contributed to this report. Peter Schworm can be reached at firstname.lastname@example.org. Follow him on Twitter @globepete.