Tegna Media stock shot up 5% in trading Thursday on the news that the station group has renewed its affiliation pact with NBC.

The new deal brings all 17 Tegna affils under a uniform, long-term agreement. Tegna (formerly Gannett Broadcasting) is the Peacock’s largest affiliate group with stations in such markets as Atlanta, Phoenix and Denver.

“NBC’s content, from sports to news to primetime, combined with Tegna Media’s trusted, innovative and impactful local programming is highly valued by our viewers,” said Dave Lougee, president of Tegna Media.

The Tegna deal comes as the Peacock is in the midst of an affiliation drama in Boston. NBCUniversal plans to launch its own station in Beantown, the nation’s eighth largest market, as of Jan. 1, 2017.

That likely means the end of NBC’s relationship with its longtime Boston affiliate WHDH, owned by Sunbeam Television, which has tussled with the network in the past. Sunbeam owner Ed Ansin has said NBC informed him last year that his affiliation would not be renewed. The move to pull a major-market station switch to an O&O is likely to raise concerns among other independent affiliate stations at a time when the clout that local stations wield with networks is already dwindling.

Tegna shares were up nearly 6% in trading Thursday to the $24 range after closing on Wednesday at $22.87.

“We’ve had a strong, successful partnership with Dave and his team for many years,” said Jean Dietze, NBC’s president of affiliate relations. “We look forward to continued collaboration to provide high-quality network broadcast content to complement Tegna’s award-winning local news and programming in key markets across the country.”