Dirk Nowitzki has signed his contract with Dallas, and a person with knowledge of the deal says it's worth more than the original agreement.

The 38-year-old star who has spent all 18 of his seasons with the Mavericks signed a two-year, $50 million contract on Wednesday -- $10 million more than the deal struck before contracts could be signed. The person with knowledge of the contract provided terms to The Associated Press on condition of anonymity because they weren't released.

After playing for two years on a hometown discount at roughly $8 million per season, Nowitzki will be the highest-paid Dallas player at $25 million in 2016-17. Free agent addition Harrison Barnes, who signed a four-year, $94 million contract, will make about $22 million next season.

More from FoxSports

Nowitzki has said he would like to play 20 seasons. There is a team option in the second year of the deal, but that decision will be driven by the 7-foot German and whether he feels he has another season in him.

The day after last season ended with yet another first-round playoff exit, Nowitzki said he believed he could contribute for at least two more years. And he showed it, leading the team in scoring in the regular season and the five-game loss to Oklahoma City.

The Mavericks haven't won a playoff series since Nowitzki led them to the franchise's only championship in 2011. They've spent the past five offseasons trying to put marquee free agents around their aging star, but haven't landed the biggest names.

The latest misses led to the addition of Barnes, a small forward who became expendable in Golden State when the 2015 champions lured Kevin Durant away from the Thunder. The Mavericks also got center Andrew Bogut from the Warriors in a salary cap-driven trade after Durant's decision.

Those two additions assured the return of Nowitzki, who said the only way he would consider leaving Dallas was if the franchise chose not to pursue veterans for another run at the postseason.

Dallas is bringing back point guard Deron Williams on a second straight one-year deal. Williams had a solid debut with his hometown team after Brooklyn bought out his contract.

The other starter is Wesley Matthews, a shooting guard who stuck with Dallas and got a max contract last summer after center DeAndre Jordan wrecked the Mavericks' free agency plans by agreeing to join them before changing his mind and staying with the Los Angeles Clippers.