In a deal that delivers the franchise some dramatic financial flexibility, the Atlanta Hawks are trading forward John Collins to the Utah Jazz.

The Hawks are acquiring forward Rudy Gay and a future second-round pick for Collins, who is owed $78 million over the next three seasons, sources said. The trade creates a $25.3 million trade exception for the Hawks — the largest in the NBA. Atlanta has a year to potentially use the exception to take on a player’s contract.

The trade cannot become official until July 6.

The deal to acquire Collins, 25, delivers the Jazz a versatile forward to play on a front line with All-Star Lauri Markkanen and All-Rookie center Walker Kessler. The Jazz were an offensive revelation under first-year coach Will Hardy, and Collins’ arrival could help Utah return to the Western Conference playoffs next season.

The Hawks and Jazz have discussed numerous iterations of the deal for over a year, but the realities of the looming changes in the league’s new collective bargaining agreement left the balance of Collins’ contract difficult to move for a return of assets — similar to the Golden State Warriors’ recent unloading of Jordan Poole and the $130 million-plus owed him.

For Atlanta, the acquisition of Gay — who exercised his $6.4 million player option for next season as part of the trade, his agent Sam Permut of Roc Nation Sports told ESPN — allows the Hawks to drop far below the $182.5 million second apron and under the $165 million luxury tax threshold for the 2023-24 season.

Nevertheless, the Hawks are expected to continue to be in a deal-making mode this offseason, and ownership has given general manager Landry Fields the OK to move into the luxury tax should it be necessary to improve the roster, sources said.

Collins’ departure also gives Atlanta a fuller opportunity to navigate possible contract extensions for three young core players: Dejounte Murray, Onyeka Okongwu and Saddiq Bey.

Collins is a Hawks success story, the 19th overall pick in 2017 who turned into one of the Eastern Conference’s better forwards. He averaged 15.8 points and 8.0 rebounds per game in six seasons with the Hawks, including 13.1 points and 6.5 rebounds in 2022-23.