Nelson Chenault-USA TODAY Sports

Sailing well into his mid-30s, Matt Barnes remained a steady starter last season with the Memphis Grizzlies. The Sacramento Kings saw that performance and decided to reward Barnes on Sunday, agreeing to terms on a deal, according to ESPN's Marc Stein.

The deal is for two years and $12 million, according to James Ham of CSN California, who added the second season is a player option.

Barnes, 36, averaged 10 points and 5.5 rebounds in 28.8 minutes per game last year with Memphis. He started 45 of 76 games after coming over via an offseason trade with the Charlotte Hornets.

Given a larger role than initially expected, Barnes struggled a bit offensively. His 38.1 field-goal percentage was a career worst, and he knocked down just 32.2 percent of his shots from deep. He clearly missed the easy buckets he had gotten used to from Chris Paul and Blake Griffin during his time with the Los Angeles Clippers.

The Grizzlies were undermanned for most of 2015-16, as injuries to Marc Gasol and Mike Conley left the roster depleted by the playoffs, as did the trades of Courtney Lee and Jeff Green at the deadline. Barnes said the Grizzlies were "coming to a gunfight with spoons" in their first-round playoff loss to the San Antonio Spurs, per Geoff Calkins of the Commercial Appeal.

Despite a strange end to the season, which saw head coach Dave Joerger jet for the Kings, Barnes remained optimistic. He said he had "three or four" more good NBA years left in him and was open for a Memphis return, per Pete Pranica of Fox Sports Southeast.

Video Play Button Videos you might like

But when the Kings came calling with a reasonable offer and the guarantee of a stable role off the bench, Barnes had to decide whether it was worth taking the cash. He was apparently persuaded.

He's still a heady, tough player, though signs of age were starting to show last season. Opponents shot 48 percent when Barnes was their primary defender, 3.6 percentage points better than their average, per NBA.com.

The biggest question with Barnes, though, is always personality fit. He seemingly spent half of his lone season in Memphis taunting former Knicks head coach Derek Fisher from a thousand miles away. The NBA even intervened, but Barnes then took glee in Fisher's firing—after the league could no longer fine him.

Barnes shouldn't be playing the 25-30 minutes a night he had to in Memphis. If he played 15-20, he'd probably be a more efficient player all around.

With Omri Casspi, Rudy Gay, Caron Butler and the newly signed Garrett Temple in tow, the Kings have enough wing players to limit Barnes' playing time. He could be a valuable contributor for Sacramento off the bench, with the potential to become far more than that if the team decides to trade Gay, which Stein reports is a possibility.