LOS ANGELES -- LeBron James has agreed to a two-year, US$85 million contract extension through the 2022-23 season with the Los Angeles Lakers.

James' agent, Rich Paul of Klutch Sports, confirmed the deal Wednesday during the first week of training camp for the NBA champions. The Lakers are still finalizing their new contract with big man Anthony Davis, who is also represented by Paul.

James is getting the maximum deal to extend his tenure in Los Angeles, where he moved two seasons ago after his second stint with his hometown Cavaliers. Davis and James teamed up last season and won the Lakers' 17th championship in the bubble in central Florida.

James' previous contract ran through the upcoming season with a player option for 2021-22, allowing the third-leading scorer in league history to become a free agent next summer if he chose. Instead, James has committed to play through his 20th NBA season with the Lakers, where he moved in 2018 after title-winning tenures in Cleveland and Miami.

James turns 36 years old in four weeks, but the 16-time All-Star's level of play hasn't dipped even slightly after 17 seasons in the league. James averaged 25.3 points and led the NBA with 10.2 assists per game last season before winning the NBA Finals MVP award in October while beating the Miami Heat in six games.

The Lakers are returning this winter with a roster that looks even better than last season's group on paper, with veterans Dennis Schr├╢der, Montrezl Harrell, Marc Gasol and Wesley Matthews joining the rotation around James and Davis.

James will make more than $39 million this season, more than $41 million next season and more than $44 million in the final year of his new deal, during which he will turn 38.

The Lakers have a history of rewarding superstars in their later seasons, allowing them to finish with the franchise rather than forcing Lakers icons to make difficult decisions about how they will wrap up their careers. Kareem Abdul-Jabbar, James Worthy, Magic Johnson, Elgin Baylor, Jerry West and Kobe Bryant all finished their Hall of Fame careers with the Lakers rather than making a late money-grabbing pit stop with another team.

Los Angeles famously gave a two-year, $48.5 million extension to Bryant when he was 35 years old in November 2013. The deal was criticized at the time for its largesse compared to Bryant's diminishing dominance, but owners Jeanie and Jim Buss felt the contract was an appropriate reward for Bryant's contributions to the franchise.

The new deal for James currently carries none of those concerns, because he is still a matchless player even after spending half of his life in the professional basketball and reaching nine of the last 10 NBA Finals while becoming the league's leading scorer in post-season history.

James has career averages of 27.1 points, 7.4 rebounds and 7.4 assists over his 17 seasons, and he stayed close to those marks in points and rebounds last season despite becoming a 6-foot-9 point guard who won his first NBA assists title.

James and his family already appeared to be comfortable with a long-term future in Los Angeles. James is increasingly involved in media production in Hollywood, while his oldest son, Bronny, is on track to graduate from private Sierra Canyon School in Chatsworth in 2023.

Davis is all but certain to re-sign with the Lakers this week, and the delay is widely interpreted as part of talks between Davis and the Lakers about the best way to keep the team in championship contention over the next few seasons. For instance, Davis could structure his deal to allow Los Angeles to pursue a third superstar in free agency next summer.

James' agreement on an extension guarantees Davis will have an invaluable teammate for at least the next three seasons if Davis chooses to stay that long. James made remarkable alterations in his game last season to become a playmaker running the Lakers' offence and clearing space for Davis to excel.