The Dallas Mavericks and star forward Dirk Nowitzki have agreed to a new three-year contract.

According to ESPN, the deal will be three-years and around $30 million total.

Nowitzki’s last contract was four-years and paid him $20 million per year. He agreed to take a pay cut in hopes of getting a top free agent such as Carmelo Anthony to sign with the Mavericks.

Re-signing Nowitzki was Dallas’ number one priority this offseason, according to Dallas News.

Maverick’s president of basketball operations Donnie Nelson told reporters following the Maverick’s exit in the playoffs that the franchise was built by Dirk and the team loves having him as a player.

Nowitzki reciprocated those feelings when he went on ESPN Dallas 103.3 FM.

“Cubes [Mavericks owner Mark Cuban] knows I don’t want to go anywhere and he doesn’t want me to go anywhere,” he said. "We’re guessing that will be over pretty quick and then we can focus on making this franchise even better.”

Nowitzki has to wait until July 10 to officially sign the contract when the official salary-cap of the 2014-2015 season is announced.