J.R. Smith has agreed to a two-year contract with the Cleveland Cavaliers, paying $5 million this season and a player option for 2016-17.

Smith declined his $6.4 million option in June.

Smith announced his return to the Cavs on Thursday night.

Smith will have a chance to test the market again next offseason when the NBA's salary cap rises significantly.