MINNEAPOLIS — Gorgui Dieng would have been one of the most sought after big men on the open market if he had become a restricted free agent next summer.

The Minnesota Timberwolves had no interest in seeing it get that far.

The team announced Monday night that Dieng had signed a four-year contract extension. The deal is worth $64 million, a person with knowledge of the contract told The Associated Press. The person spoke on condition of anonymity because the team did not publicly announce the terms.

Keeping Dieng was a crucial first move for the Timberwolves, who will have to spend millions in the coming two years if they want to keep their core of Andrew Wiggins, Zach LaVine and Karl-Anthony Towns — who all are on affordable rookie contracts — intact.

Dieng isn't as well-known as Towns and Wiggins, but the versatile big man is instrumental to the team's success. He is averaging 13.0 points and 13.5 rebounds in the first two games this season, and his ability to play both power forward and centre, defend multiple positions and knock down the midrange jumper make the 26-year-old a perfect fit with what the Wolves want to do.

Dieng was the 21st overall draft pick in 2013 by the Utah Jazz, who traded him and Shabazz Muhammad for Trey Burke on draft night. It was a masterful decision by the late Flip Saunders, who ended up getting two rotation players for Burke, a scoring point guard who has struggled to find his fit in the NBA to this point.

Dieng is much more than a rotation player, having started alongside Towns to give the Timberwolves one of the most promising young frontcourts in the league. His ability to defend the pick-and-roll coupled with flashes of range that occasionally stretches back to the 3-point line helped new coach and president Tom Thibodeau and GM Scott Layden quickly decide that they wanted to keep him around for the long haul.

In a market where big men were getting enormous deals — Oklahoma City's Steven Adams and Utah's Rudy Gobert each signed four-year extensions worth at least $100 million on Monday — Dieng comes at a relative bargain. As the sides negotiated Monday with a midnight Eastern deadline looming to get a deal done, Wolves owner Glen Taylor met personally with Dieng to drive home how important he was to the team's success going forward.

Dieng's contract also gives the Timberwolves flexibility going forward to be able to pay the premium they will need to pay for Wiggins and Towns, and perhaps LaVine as well.

And $64 million is life-changing money for anyone, but especially for Dieng, who came to the United States from Senegal, won a national championship at Louisville and established himself as a starting-calibre big man in the NBA. Dieng continues to send aid and develop programs to help back home, and this contract will go a long way toward helping him continue his philanthropy.

Dieng has been particularly active in donating much-needed supplies to the hospital in his hometown of Kebemer.