Free-agent guard Isaiah Thomas has agreed to a one-year, $2 million deal with the Denver Nuggets, league sources told ESPN.

Thomas met with Tim Connelly, Denver’s president of basketball operations, and coach Michael Malone in Las Vegas in recent days, continuing to talk and text with them about a role and circumstances surrounding him joining the Nuggets, league sources said.

This is a high-reward, low-risk gamble for the Nuggets, who aspire to reach the Western Conference playoffs this season. For Thomas, it is a chance to re-establish himself on a winning team, stay healthy and re-enter free agency next summer.

Malone is planning for Thomas, rehabbing from hip surgery, to play a significant scoring and playmaking role off the Nuggets bench. Malone coached Thomas with the Sacramento Kings in 2013-14 and has been enthusiastic about incorporating him into the Nuggets.

Thomas, 29, has been steadily progressing in rehabilitation since his early April procedure on his right hip. Thomas averaged 29 points for the Boston Celtics in 2016-17, a second-team All-NBA season that appeared to be clearing the way for a long-term, $100 million contract. But a torn labrum that cost him eight months of rehab, and a trade to the Cleveland Cavaliers last summer, upended his hopes for that kind of a long-term deal.

Thomas joined the Los Angeles Lakers as part of a trade-deadline deal with Cleveland, where he had played only 15 games in the 2017-18 season. Thomas has spent time rehabbing between Seattle and Los Angeles this summer.