Russell Westbrook understands that he and James Harden both will both have to sacrifice parts of their game to win. (0:51)

Houston Rockets guard Eric Gordon has agreed to a three-year, $54.5 million contract extension that will take him through the 2022-23 season, league sources told ESPN on Friday night.

Gordon's deal -- which starts with the 2020-21 season -- includes a $20.9 million season in 2023-24 that would become guaranteed if Gordon makes an All-Star team or if the Rockets win an NBA championship during the course of the deal, league sources said.

The Houston Chronicle first reported an extension had been reached.

Gordon, 30, was entering the final year of his contract in 2019-20, which is worth $14 million.

Gordon has averaged nearly 17 points in his three seasons with the Rockets, including an NBA Sixth Man of the Year award.

Gordon is part of a nucleus that includes James Harden, Russell Westbrook and Clint Capela that's expected to compete with the elite in the Western Conference.