The Brooklyn Nets and restricted free agent Cam Johnson agreed to a four-year, $108 million contract Friday, according to ESPN's Adrian Wojnarowski.

Johnson was one of the key pieces acquired from the Phoenix Suns in Brooklyn's midseason blockbuster trade of Kevin Durant. The 27-year-old is coming off the best season of his career, averaging 15.5 points per game on 47/40/84 shooting splits for the Suns and Nets. He was Brooklyn's top playoff performer during a first-round sweep against the Philadelphia 76ers, averaging 18.5 points on 50.9 percent shooting from the field and 42.9 percent from three (7.0 attempts per game). That included a 22-point first half in Game 2.

The Nets opened space below the luxury tax line for Johnson's deal Friday by trading Joe Harris' expiring contract worth $20 million to Detroit. After paying the tax for the last three years, Brooklyn has an incentive to avoid doing so again this season. Teams exceeding the tax line three times in four years are subject to the repeater tax, meaning they pay $2.50 per every dollar salary over. That figure increases to $2.75, $3.50 and $4.25 for every additional $5 million.

Aside from savings for owner Joe Tsai, dodging the tax for the next two seasons would ensure the Nets are not subject to the repeater tax until 2028 at the earliest.

After trading Harris and agreeing to Johnson's new deal, the Nets have $158.5 million in committed salary. With the luxury tax set for $165M, Brooklyn now has $6.5M below the line to use in trades or free agency, assuming Johnson's contract isn't front or back-loaded. That number could increase with another salary dump. Patty Mills ($6.8M) and Royce O'Neale ($9.5M) are candidates for another cost-shedding move.

The Nets can sign free agents up to the full $12.4M mid-level exception. They can also acquire a player via trade up to $20 million using the trade exception generated in the Harris trade.

The Pistons were seen as Brooklyn's biggest threat to sign Johnson after hiring former Suns head coach Monty Williams to a record-breaking deal last month. That speculation ended after Detroit absorbed Harris into their cap space in return for a pair of second-round picks. Mikal Bridges, Johnson's “Twin” dating back to his first year in Phoenix, had been vocal about his desire for Brooklyn to re-sign the 6-foot-8 sharpshooter. Bridges voiced his approval on Twitter shortly after news of the deal broke:

While Johnson and Bridges are locked into Brooklyn for next season, the rest of the roster could look significantly different as the Nets navigate the free-agent and trade markets.