PORTLAND (AP) — With advertising shrinking and newspapers vanishing, Maine's largest newspaper group became the latest to try a nonprofit model with the completion of the sale of more than 20 daily and weekly newspapers, including the Portland Press Herald.

The National Trust for Local News, which already owns two dozen newspapers in Colorado, is expanding its portfolio through the purchase of five daily newspapers and 17 weekly newspapers that were part of Masthead Maine. Former Masthead owner Reade Brower retained ownership of several weeklies that weren't part of the deal.

The newspapers will now fall under the umbrella of the Maine Trust for Local News with the closing of the deal on Tuesday. Terms of the transaction were not disclosed.

The deal, which covers all of the state's daily newspapers except the Bangor Daily News, represents a trend toward a nonprofit business model as newspapers continue to struggle.

"I wouldn't say it's sweeping the country but we're seeing this trend. And it's a healthy one. Commercial news organizations are struggling from loss of advertising revenue," said Tim Franklin, senior associate dean and leader of the Local News Initiative at Northwestern University's Medill School of Journalism.

The transformation from a commercial business to a nonprofit was a positive outcome compared to other alternatives including corporate ownership that could have been more focused on making making cuts to maximize profits, executives told Portland Press Herald employees at a meeting and celebration in South Portland.

"Too many corporate news owners across the country have abandoned their missions in the name of short-term profits. That will not happen here," Steve Greenlee, editor of the Portland Press Herald, told The Associated Press in a statement.

Former Masthead Maine CEO Lisa DeSisto, who will continue her leadership role as CEO and publisher of the Maine Trust for Local News, called the deal "an incredible outcome for our employees, our readers and the state of Maine."

"I worked lots of days in the newspaper business — this was the best one," DeSisto wrote in an email after briefing workers at meetings in South Portland, Augusta, Waterville and Brunswick.

Local news is in crisis with the nation losing a quarter of its newspapers since 2005 and advertising revenue declining by as much as 80% over a decade, Franklin said.

Reade Brower, the newspapers' former owner, purchased MaineToday Media, the parent company of the Press Herald, the Kennebec Journal and Morning Sentinel, in 2015 and added newspaper groups and newspapers over the next several years.

Brower, 66, announced in March he was considering selling his media holdings and he said Tuesday that he chose the "least disruptive" option for his workers. "I had other choices. This is the one that felt the best to me. I didn't do this to create wealth. I did this to create a sustainable business. And that's what I've done," he said Tuesday evening.

There is plentiful foundation and philanthropic money spent on digital startups and niche publications, so it's encouraging to see them purchasing a traditional entity with credibility instead of chasing something that's "shiny" and new, Franklin said.