Dirk Nowitzki undergoing ankle surgery, out for the season

Dirk Nowitzki of the Dallas Mavericks had season-ending surgery on his left ankle Thursday, the team announced.

A 39-year-old forward, Nowitzki elected to have the surgery now and miss the Mavericks’ final four regular-season games to begin the rehabilitation process as soon as possible. The Mavericks were eliminated from playoff contention nearly a month ago.

In a statement, the team said the procedure was a “surgical debridement of his left ankle.” The surgery is expected to improve Nowitzki’s chances of playing next season.

Nowitzki, who turns 40 on June 19, averaged 12.0 points and 5.7 rebounds in 24.7 minutes per game this season and remained an efficient and effective offensive player despite his declining mobility. He ranks sixth on the N.B.A.’s career scoring list, just 232 points behind No. 5 Wilt Chamberlain (31,419).

MacMahon called the surgery "relatively minor" and said it isn't expected to impact whether Nowitzki decides to play next season. According to Marc Stein of the New York Times, the surgery was already planned when Nowitzki previously said, “As of now, I’m planning to come back,” Nowitzki told Stein last week. “I feel great. I’ve only missed one game all season. I signed a two-year contract because I wanted to play two more years. And here we are.”

Still, it is another setback for Nowitzki, who dealt with Achilles issues last season and played just 54 games.

Nowitzki is a no-doubt future Hall of Famer and has one of the best resumes in basketball history as a 13-time All-Star. He was the 2006-07 MVP and 2011 NBA Finals MVP and has averaged more than 20 points a night 13 seasons in his career.

The Mavericks (24-55) will miss the playoffs for a second-straight season. If Nowitzki returns, he would pass Kobe Bryant for the longest continuous run with one team in NBA history.