YARMOUTH — The 49th annual Yarmouth Clam Festival kicked off under sparkling sunny skies Friday, but there was a cloud on the horizon: clam prices.

A long, cold winter and invasive green crabs hurt the clamming business this spring, when many of the clam festival vendors contract to buy the centerpiece of the three-day event. Wholesale clam prices rose by as much as 40 percent and the vendors, whose proceeds go to local charities and school activities, had to respond in kind.

The Yarmouth Ski Club, which uses what it nets from sales of fried clams and crab cakes at the festival to support the middle and high school ski teams, had to hike prices for the second year in a row. A pint of fried clams, $16 two years ago, went to $18 last year and then to $20 this year, said Sam Eddy, who “retired” last year from overseeing the clam cooking and selling but was back behind the booth working again this year.

“It’s a lot to ask a family to pay $20 for a pint of clams,” said Anne Ball, who was also working at the ski club’s booth. She said that crab prices actually dipped a little bit this year, easing the financial picture for the ski club some.

There’s apparently no shortage of clams, but the market has tightened and forced prices up, Eddy said.

“We were able to get clams, but we had to pay more,” he said. Prices had been stable for about five years, he said, but the harsh winter of 2013-14 delayed the start of the clamming season, and then green crabs started getting to the clams before the clammers could.

Green crabs are an invasive species that love clams, apparently as much as the humans who attend the festival. Marine scientists say the crabs have been reported in Maine for more than a century, but they think rising water temperatures have led to an explosion in their numbers and an expansion of their range northward.

The crabs have no natural predators, but the state is sponsoring efforts to determine the best way to control their numbers and figure out if there might be a commercial market for their meat.

There’s no doubt about the market for clams. The ski boosters contract with processors in Freeport and Scarborough for the clams in March, Eddy said, and they are caught and flash-frozen in April and May. He said the ski club ordered 200-250 gallons of clams for the festival, enough for 1,500 to 2,000 servings.

Eddy hopes that the weather holds to allow the club to sell out, and Friday’s sunshine and warmth was a good omen, with a forecast of more of the same for Saturday and Sunday. Last year, he said, hot weather caused sales to plunge. Eddy said the ski club booth sold just 46 gallons of fried clams on the Saturday of the festival last year, about half of the normal volume for that day.

More than 130,000 people usually turn out for the weekend festival.

“This festival lives and dies with the weather,” Eddy said. “Seventy-five degrees and overcast – so people don’t go to the beach instead – is perfect.”