The Dallas Mavericks and future Hall of Fame power forward Dirk Nowitizki have agreed to a two-year, $40 million deal, according a report by ESPN's Marc Stein.

For years, Nowitzki gave the Mavs a hometown discount. Coming off a four-year deal in 2014 that paid him $20 million-plus per season, Nowitzki signed a three-year, $25 million deal. The idea was to give the Mavs flexibility to bolster the roster for his final few seasons. They signed Chandler Parsons and Wesley Matthews. They nearly signed DeAndre Jordan. But they could never get the big free agent.

So the Mavericks are giving back in what will probably be the final contract of Nowitzki's career, handing the German legend 250 percent raise over his previous contract.

The Mavs have had a productive offseason but not exactly what they were hoping for. They couldn't get Hassan Whiteside, Parsons or Mike Conley. But they've taken advantage of the Kevin Durant-to-Golden State news by acquiring Andrew Bogut as their starting center and signing Harrison Barnes after he became an unrestricted free agent. They've also re-signed Dwight Powell and Deron Williams, while luring Seth Curry on a two-year deal.

They're doing their best to keep the roster competitive for Nowitzki's final run, and -- in offering the same contract Miami threw at Dwyane Wade -- giving him a nice pay bump to boot.

Dirk Nowitzki isn't going anywhere. Getty