Kevin Durant and the Houston Rockets have come to terms on a two-year, $90 million extension.

According to The Athletic, Durant is the record holder for the highest career earnings in NBA history at $598.2 million based on current and future salaries, surpassing LeBron James’s former record  ($583.9 million). This season, Durant will earn $54.7 million and will have three years and $144.7 million on his contract on the his deal.

With the new contract, Durant will remain a Rocket through the 2027-28 season, and he could bring his legendary career to an end in Houston. In the final year of this contract, the two-time champion will be 39 years old.

Because the deal is approximately $30 million short of the maximum extension Durant was eligible to sign, the Rockets have some financial flexibility to keep their young core intact for the future.

Landing Kevin Durant in a blockbuster trade over the summer was one of the biggest offseason moves in the league. During Media Day,  Durant told reporters that he’s excited to be in Houston and that he looks forward to signing a contract extension. 

“I do see myself signing a contract extension,” Durant said. “I can’t tell you exactly when it’ll happen. But I do see it happening.” 

He also spoke about how he’s watched the Rockets progress from afar.

“Just seeing the quick progression of this franchise, from where it was right after that Chris Paul-James Harden era to seeing what (Rockets coach) Ime (Udoka) got here and how he turned it around so fast,” Durant said. “It just felt organic and natural coming into the gym and being a Houston Rocket for the first time.”

Appearing in 75 games—his most since the 2018-2019 season— with the Phoenix Suns, Durant averaged 27.1 points, 6.6 rebounds, and 5.0 assists per game, earning his 14th All-Star selection and an All-NBA Second Team nod. He shot 52.3 percent from the field and 41 percent three-point range. Durant also surpassed the 30,000 career point mark.