The Portland Pirates are leaving Maine after 23 seasons, catching many by surprise and forcing Cumberland County to find a new major tenant at Cross Insurance Arena.

The American Hockey League franchise is being bought by a group of investors who plan to move it to Springfield, Massachusetts, Mayor Dominic J. Sarno said Wednesday.

“I have been informed that a broad-based local investor group has signed a letter of intent to purchase the Portland Pirates,” Sarno said in a statement. Terms of the sale were not available Wednesday.

Portland Mayor Ethan Strimling learned of the plans when a reporter called him with questions late Wednesday afternoon. Strimling said the city had not been contacted by anyone from the Pirates organization about the pending move of the minor-league hockey team.

“I’m very disappointed that they are leaving and that the city was left out of the conversation,” Strimling said during an impromptu news conference at CIA, where the Pirates have played since 1993. “It is going to have a terrible impact on our local economy.”

Even Pirates players and staff were caught off-guard.

“That’s a complete shock,” said Mike McKenna, the winningest goaltender in Pirates’ history. “Just the worst news I’ve ever gotten in my life.”

The Pirates later issued a brief statement saying “a letter of intent has been signed with an outside buyer to purchase and relocate the AHL franchise to a new city. The details of the agreement were not disclosed and final sale is pending approval of the AHL Board of Governors and the Florida Panthers.

“All previously purchased season tickets for the 2016-2017 season will be refunded.”

The Pirates, whose season ended Sunday, just completed the second year of a five-year lease with the county. The lease has provisions in the event the team breaks the agreement that limit the damages the arena can claim to $100,000, according to Mitch Berkowitz, chair of the board of trustees for county-owned CIA. He said an executive session of the board is scheduled for Thursday morning.

Strimling said taxpayers should be upset that they helped pay for a $34 million renovation of the arena in 2013, only to see its anchor tenant leave without warning a few years later.

“Tens of millions of dollars went into that facility,” he said. “When taxpayers put that much money into a project we should have at least been called to the table.”

Ron Cain has been majority owner of the Pirates since December 2013. The team played in Lewiston that winter because the arena – then known as the Cumberland County Civic Center – was being renovated and because of a lease dispute with the county. Shortly after he took control of the Pirates, Cain negotiated a five-year lease with the county.

The Pirates struggled with attendance the past two seasons, finishing last among the AHL’s 30 teams in 2014-15 (2,963 fans per game) and 29th in 2015-16 (3,363). Springfield had the AHL’s worst attendance this winter. In the summer of 2014, Cain said the Pirates needed to draw an average of 4,000 fans to break even.

Cain did not return phone calls from the Press Herald seeking comment on Wednesday.

Earlier in the day, Brad Church, the Pirates’ chief operating officer, said he had no details of a sale and was unaware of potential buyers. Church added that the team was still marketing season-ticket packages for this fall.

Indeed, Scott Prue of Biddeford was in the Pirates’ office at 4 p.m. to pick up a jersey won by his son in a raffle and to renew three season tickets. Ben Locke, director of ticket operations, was helping Prue with the transaction when an associate called Locke to a back room.

“Two minutes later, he came back and said he was sorry, but apparently the team was moving to Springfield and that I had to leave the office,” Prue said. “As I was leaving, I had to unlock the front door because they had locked it.”

Locke “looked teary-eyed and upset,” Prue said. “It’s very disappointing. I’m completely shocked. It seemed like the Pirates staff was shocked as well. I don’t think any of them knew, either.”

Prue, 27, was looking forward to his eighth year as a season-ticket holder. He even endured the trips to Lewiston.

“At least when they went to Lewiston I still had a team to watch,” he said. “Now I have nothing to watch.”

The Pirates have played in downtown Portland since the fall of 1993, winning the AHL’s Calder Cup in their first season. The Pirates have had five NHL affiliates since arriving in Portland, most recently the Florida Panthers.

Finding an AHL team to replace the Pirates will be challenging. Last spring, five AHL franchises relocated to the West Coast, including the franchise based in Manchester, New Hampshire. A team from the ECHL – a professional league one level below the AHL – now fills the void at Manchester’s Verizon Wireless Arena.

Springfield has been searching for a team to replace the AHL’s Falcons, who were bought last month by their NHL affiliate, the Arizona Coyotes. They plan to move the franchise to Tucson, although the deal has yet to be approved by the AHL.

“While we understand there are still some hurdles to overcome,” Sarno said, “we are encouraged by this news and hopeful that professional hockey will be back in Springfield this upcoming season.”

Pirates general manager Eric Joyce, who has been part of the Panthers’ front office since 2013, said the NHL team was willing to accept a “significantly lower affiliation payment” in order to keep the team in Maine under independent ownership.

“Our objective was to stay in Portland,” he said Wednesday evening. “We felt at home up there. Guys are broken up about it.”

Joyce said the Panthers spent roughly $4 million on player salaries for their AHL affiliate and received $800,000 from the Pirates to help offset the expense.

On April 22, the day of Portland’s first playoff game, a 6-4 victory over Hershey, Joyce received a phone call from someone in Springfield saying a group of investors might try to buy the Pirates. He hung up and called Church, who contacted Cain.

“Ron said, ‘I can’t sustain these losses and Springfield wants to buy a team,’ ” Joyce said.

When a potential buyer that would keep the team in Portland emerged – Charlie Pompea, who sold the Falcons to the Arizona Coyotes – the Panthers offered to restructure the affiliation payment, Joyce said. It wasn’t clear Wednesday night what kept that deal from happening.

Joyce said he even spoke briefly with Panthers ownership about the possibility of buying the AHL franchise.

“We lose money in Florida,” Joyce said of the NHL team. “We just didn’t want to take on a second team that looked like it would lose a significant amount of money, too.”

Joyce is concerned about the players who figured they would be returning to Portland this fall, and now face a move to Springfield.

“It’s bizarre to me,” said Rob Schremp, who led the Pirates in scoring this season. “This is a great city for hockey, one of the better places to play.”

Staff Writers Dennis Hoey and Edward D. Murphy contributed to this report.