Harrison Barnes is sticking around in Sacramento.
The 31-year-old agreed to a three-year, $54 million contract extension on Thursday to avoid unrestricted free agency, ESPN’s Adrian Wojnarowski reported.
Barnes, entering his 12th season in the NBA and sixth with the Kings, was an important piece of Sacramento’s first playoff berth since the 2005-06 season.
He averaged 15 points and 4.5 rebounds while shooting 3 percent from 3-point range this past season, all in line with his career numbers.
The 6-foot-8 forward, who was selected seventh overall in the 2012 draft, has been a member of three teams over his NBA tenure, including the 2014-15 NBA title-winning Warriors.
Following his years with Golden State, he signed a four-year, $94 million contract with the Dallas Mavericks, where he played until the 2018-19 season, after which he was traded to the Kings.

Barnes then inked a four-year, $85 million deal with Sacramento that took him through this past season.
Read Related Also: DeBlasio hit with "historic fine" over failed POTUS run
The forward has been a vital part of the Kings’ transformation, providing steady shooting and consistent defense on the perimeter.
Sacramento posted a winning record last season for the first time during Barnes’ tenure, as De’Aaron Fox and Domantas Sabonis led the team to a 48-34 mark.
In the postseason, the Kings battled in a hard-fought loss in the first round of the playoffs to the Warriors.

The Kings, whose offense led the league with 120.7 points per game, took a gamble when they traded their young star Tyrese Haliburton for Sabonis, an older forward.
But the team blossomed with the tandem of Fox and Sabonis leading the way, forging one of the league’s most efficient and electric offenses.
Barnes, who has been a consistent player over the course of his career, was one of the three NBA players to play all 82 games last season, along with Brooklyn forward Mikal Bridges and Chicago center Nikola Vucevic.

Only once during his 11-year career has Barnes not played in at least 60 games.