Restricted free agent center Mason Plumlee has agreed to a three-year, $41 million deal to return to the Denver Nuggets, league sources told ESPN.

With the deal, Denver was able to avoid Plumlee signing a $4.6 million qualifying offer for the 2017-18 season -- which would've allowed him to become an unrestricted free agent next summer.

For the Nuggets, the Plumlee deal solidifies one of the NBA's better frontcourts with Nikola Jokic and Paul Millsap.

Denver acquired Plumlee, 27, from Portland in the February deal for center Jusuf Nurkic. In four NBA seasons with Brooklyn, Portland and Denver, Plumlee has averaged nine points and 6.5 rebounds.