The Philadelphia 76ers and Robert Covington have agreed to a four-year contract extension that will keep the small forward under contract through the 2021-22 season, according to multiple sources familiar with the negotiations.

The contract also includes a renegotiated salary for the 2017-18 season, allowing the Sixers to increase Covington’s salary this year by more than $15 million, league sources tell The Athletic. Covington will then earn just under $45 million over the following four seasons, according to multiple league sources.

Adrian Wojnarowski of ESPN was the first to report that an agreement had been reached. The deal should be finalized with the league office within the next 48 hours.

Even though the Sixers signed J.J. Redick (1 year, $23 million) and Amir Johnson (1 year, $11 million) to big-money (but short-term) contracts last summer, they still retained significant salary flexibility in order to get this renegotiation and extension with Covington finalized. That salary flexibility allowed the Sixers and Covington to arrive at a mutually beneficial contract that accomplished both Covington and the team’s objectives.

The Sixers and Covington had to wait until the three-year anniversary of his current contract to renegotiate his final season. Covington signed his last contract on November 15, 2014, thus establishing today as the first day he was eligible for a renegotiation.

Covington will receive just under $62 million between now and the end of the 2021-22 season. In order to match that five-year total with another team, Covington would have needed to command a salary in excess of 4 years and $60 million next summer. With the major increases to the salary cap the NBA saw as a result of the new national television deal now in the rear-view mirror, and with fewer teams having significant cap space than in recent free-agency periods, there was no guarantee Covington would garner more than that amount on the open market in July.

Covington has developed into a key part of the Sixers’ future as a dynamic two-way, three-and-D weapon. Over the last few years he’s become one of the league’s best perimeter defenders, showcasing a combination of positional versatility and quick hands to earn Defensive Player of the Year votes last season. He’s also having his best offensive season to date this year, averaging a career-high 16.8 points per game while shooting an even 50 percent on 7.4 three-point attempts per game.

The Sixers’ unique ability to essentially give Covington a $15.1 million bonus this season allowed them to get Covington on a below-market contract over the remaining four years of the extension, a critical step in clearing salary to be able to offer a maximum contract in free agency next summer.

The NBA allows teams to decrease the salary from the renegotiated season (2017-18) to the first year of the extension (2018-19) by up to 40 percent. That means Covington’s four-year extension will begin just north of $10 million next season, according to a source, and increase by just over $800,000 year-over-year after that.

In all, Covington will earn $16.7 million this season, then just under $45 million over the next four seasons. That comes out to roughly $10.02 million in 2018-19, $10.8 million in 2019-20, $11.6 million in 2020-21 and $12.4 million in 2021-22. Multiple league sources have verified the basic structure of the contract.

Renegotiated contracts are rare in the NBA. As Bobby Marks of ESPN pointed out, Covington is only the eighth player to have his contract renegotiated since 1998, with his $15.1 million increase the largest in league history. Teams generally use their available cap space to acquire players outside of the organization, either via trade or free agency.

But the Sixers are in a unique situation, with the team just coming out of a multi-year rebuild, with an almost entirely clear salary sheet and a cap that has risen by nearly $50 million over the last few seasons thanks to an influx of money from the national television contract. That paved the way for the Sixers to creatively use their salary cap space to minimize the cap hit on a new contract for a key contributor such as Covington.

With Covington’s $10 million 2018-19 salary and a contract extension for Joel Embiid, the Sixers have just over $70 million in salary cap commitments for the 2018-19 season, assuming they renounce the $5.1 million qualifying offer for Nik Stauskas. That would leave them with roughly $30.8 million in available cap space next summer.

(This could be increased slightly if the Sixers decide to cut the non-guaranteed contracts of T.J. McConnell and Richaun Holmes, who are both slotted to make just under $1.5 million next season. Both players are bargains at that price point, however).

There are a couple of factors which could eat into that $30.8 million in cap space, however.

The first is whether any of Anzejs Pasecniks (25th pick in the 2017 draft), Jonah Bolden (36th pick) or Mathias Lessort (50th pick) come over next summer. The cap hit for any of them would be minimal, but it could decrease that number ever-so-slightly nonetheless.

The second, and more substantial, factor is what happens with the 2018 draft pick(s) the Sixers currently possess. This number could range anywhere from about $2 million to about $11 million, depending on how the season (and lottery) plays out. In addition to their own draft pick, the Sixers will receive the Lakers 2018 first-round draft pick if it falls either No. 1 overall or lower than the 5th pick after May’s lottery.

The No. 1 overall pick would have a cap hold of over $8 million, although that cap hit would be classified as a good problem to have for the Sixers.

Finally, if Embiid earns an All-NBA nomination or wins the MVP award this year, he will reach “super max” status, which would increase his 2018-19 salary by just over $5 million.

Still, it looks as if the Sixers should have room to offer a 25% maximum contract next summer.

Max Contracts 25% max 30% max 35% max 2017-18 $25.25 million $30.30 million $35.35 million 2018-19 $27.0 million $32.4 million $37.8 million

(Projections for how much a maximum contract will cost over the next two seasons. How much a player can earn is based on experience. Players with 0-6 years of experience can earn up to 25% of the cap, players with 7-9 years can earn up to 30%, and players with 10+ years can earn 35%. There are various benchmarks which, if reached, can allow certain players to move up to the next bracket).

One way in which the Sixers could get closer to offering a 35% max deal is to find a taker for Jerryd Bayless, who is scheduled to earn just under $8.6 million next season, the final season of the three-year contract he signed during the summer of 2016.

If the Sixers are not able to attract a star free agent next summer they could theoretically carry much of that salary cap space into the summer of 2019, when the cap is expected to jump up to $108 million. While the exact details of how much cap space the Sixers could have depends on a number of variables that need to play out between now and then — not the least of which is what happens in the 2018 draft — the Sixers could theoretically have $35 million or more in cap room in the summer of 2019 if they end up punting on free agency next year.

In all likelihood, 2019 would be the Sixers’ last chance to be a major player in free agency before the cap holds for Ben Simmons and Dario Saric, in addition to the contracts for Embiid and Covington, become prohibitive.

Regardless of the path they pursue, the Sixers have locked up a key starter in Covington to a long-term, team-friendly contract, while still retaining the flexibility to be players in free agency over the next two seasons.

Top photo: Rob Carr/Getty Images