Nuggets president of basketball operations Tim Connelly will be leaving Denver for Minnesota, according to Adrian Wojnarowski of ESPN, who reports that Connelly and the Timberwolves have agreed to a deal that will make him one of the NBA’s highest-paid executives.

Connelly’s new contract as the Wolves’ president of basketball operations will cover five years and will be worth $40MM, per Shams Charania and Jon Krawczynski of The Athletic. The agreement will also include a kicker for ownership equity, The Athletic’s duo adds.

After Timberwolves minority owners Marc Lore and Alex Rodriguez initiated talks with Connelly and presented him with a preliminary offer, the longtime Nuggets executive flew to Minnesota on Saturday and had a four-hour meeting with majority owner Glen Taylor, according to The Athletic. Taylor signed off on the offer, and Connelly subsequently took two full days to deliberate before accepting the job on Monday.

Connelly had been the head of basketball operations in Denver since 2013, following Masai Ujiri‘s departure for Toronto. He reportedly had a significant impact on the Nuggets’ culture, empowering coaches, staffers, and players while creating a positive work environment.