Dallas Mavericks forward Dirk Nowitzki has been ruled out of the team's regular-season opener against the Phoenix Suns and will miss several games as he recovers from an ankle injury.

Nowitzki, 40, underwent ankle surgery in April to remove bone spurs and has been shelved throughout the Mavericks' preseason play.

Coach Rick Carlisle has also made the decision to have Nowitzki sit out of Dallas' opener Wednesday at the Suns.

"It's going to be multiple weeks, I can tell you that," Carlisle said of a return date. "But there's no real soft or hard date at this point.

"He is doing better but has not done any significant court work. His rehab work is ongoing, and we can update you in another 10 days or something like that."

Nowitzki suffered a setback while playing in a pickup game a week before camp began, leaving him with soreness in the tendon in his left foot and ankle.

The 20-season veteran, injury-free for most of his career, missed long stretches in two of the past five seasons. He sat out the first 27 games of 2012-13 after undergoing arthroscopic knee surgery in the preseason and then was out for 24 games at the start of the 2016-17 season with Achilles soreness.

The 13-time NBA All-Star averaged 12.0 points and 5.7 rebounds in 77 games last season. He also averaged 24.7 minutes per game, which is the fewest since his rookie season in 1998-99. 

Injuries continue to plague the Mavs' post players, as forward Harrison Barnes is questionable for Wednesday's game against the Suns due to a hamstring strain that also has sidelined him for the entire preseason. 

"[Barnes] is doing better each day," Carlisle said. "His availability for the first game is going to hinge on whether he can get any quality practice time in between now and then."