Trevor Ariza and the Kings agreed to a two-year, $25 million contract at the onset of NBA free agency Sunday, a source confirmed to NBC Sports California's James Ham. 

Ariza, a 15-year veteran, averaged 12.5 points, 5.4 rebounds, 3.7 assists and 1.3 assists per game last season in 69 contests with the Suns and Wizards. The 34-year-old was a critical part of the Rockets two seasons ago, and his perimeter defense helped Houston push the Warriors to Game 7 of the 2018 Western Conference finals. 

Back in 2009, Ariza won an NBA championship alongside new Kings coach Luke Walton on the Lakers.

The veteran wing solidifies the Kings' depth at the position, whether or not he starts. Ariza's presence can allow Harrison Barnes to play power forward if the Kings want to go small, and Sacramento now has three capable options who can play small forward in Barnes, Ariza and Bogdan Bogdanovic. Plus, Ariza also can play the two, which likely makes veteran free agent Corey Brewer expendable.

[RELATED: Barnes, Kings agree to four-year, $85M contract]

With 1,011 NBA games under his belt, Ariza now is far and away the most experienced veteran on Sacramento's roster. He'll turn 36 when his contract expires in 2020, but the Kings will count on him to contribute in the meantime.