OAKLAND, Calif. (AP) — All-Star guard Klay Thompson is staying put with the Golden State Warriors.

Thompson announced his decision on his Instagram account Monday, using a clip of Leonardo DiCaprio in the movie "The Wolf of Wall Street" with the line "I'm not leavin!'" Thompson's agent, Greg Lawrence, said later his client will sign a five-year max contract for $190 million when the NBA free agent moratorium period ends.

Thompson had always wanted to stay with Golden State, saying last year: "I've said it many times before: I would like to be a Warrior for life."

He was scheduled for surgery last week for a torn ACL in his left knee after he was injured during a Game 6 loss to the Toronto Raptors in the NBA Finals. Neither the Warriors nor Lawrence have said whether it has been done.

Along with Splash Brother Stephen Curry, Thompson is part of one of the most dangerous backcourts in the NBA, given their accuracy from 3-point range that extends well beyond the line. He has been durable, too, never missing a postseason game before sitting out Game 3 of this year's finals because of a strained left hamstring.

Warriors general manager Bob Myers said last week he planned to sit down with Thompson before the start of free agency Sunday, when Golden State saw Kevin Durant depart for the Brooklyn Nets. The two-time NBA Finals MVP is recovering from surgery for a torn right Achilles tendon that he injured in Game 5 of the finals.

Being part of the Warriors' dynasty — five straight NBA Finals berths and three championships in four years from 2015-18 — appeals to Thompson. He has cherished his role alongside more notable superstars like Curry and Durant, content staying under the radar.

"It's hard to walk away from something, you were here when it started and yeah, you just want to stay on the train as long as you can," Thompson said last year.

One of the most dynamic shooters in the league, Thompson also is a top defender who often draws the assignment of an opponent's star player.

Thompson scored a career-high 60 points on Dec. 5, 2016, for the highest-scoring performance by a Golden State player in more than 42 years. He scored 40 by halftime in just 18-plus minutes and didn't even play the fourth quarter of the 142-106 home rout of the Pacers. On Jan. 23, 2015, Thompson scored 37 points in a quarter, making all 13 of his shots in the spectacular shooting performance against the Kings.

Golden State now will have Thompson and Curry locked up for the long haul, which will mean so much for the franchise as it moves into new Chase Center in San Francisco next season. Curry received a $201 million, five-year contract last July.