Harrison Barnes, who was acquired by the Kings from the Mavericks in a playoff push at the NBA trade deadline, will remain in Sacramento.

Barnes agreed to terms on a four-year, $85 million deal Sunday, Barnes' agent told ESPN.

The Kings got Barnes in a package that included Justin Jackson and Zach Randolph as they tried to make the playoffs for the first time since 2005-06, an effort that fell short as Sacramento finished ninth in the Western Conference.

The Kings were 28-26 when they made the trade and went 11-17 the rest of the season, although the 39 wins was their most since the playoff year.

In the 28 games with the Kings, Barnes averaged 14.3 points and 5.5 rebounds per game while shooting 40.8% from 3-point range and 45.5% from the field.

His 2018-19 scoring average dropped from Dallas, where he averaged 17.7 points per game.

In seven NBA seasons, he has averaged 13.6 points, 4.9 rebounds and 1.5 assists in 30.7 minutes per game.