Updated

A person with knowledge of the deal says the Sacramento Kings and forward Rudy Gay have agreed to a $40 million, three-year contract extension that runs through the 2017-18 season.

The person, who spoke to The Associated Press on Sunday on condition of anonymity because the team had not made an official announcement, also says the extension includes a player option in the final year of the deal.

Yahoo Sports first reported the agreement.

Gay is making $19.3 million this season. He was set to become a free agent in July.

Sacramento acquired Gay in a trade with Toronto last season, and he has teamed with center DeMarcus Cousins to form a dynamic scoring duo in California's capital city. Gay is averaging 22.5 points, 6.8 rebounds and 3.5 assists this season to help the Kings get off to a surprising 6-4 start.