The Dallas Mavericks' season ended when they were eliminated from playoff contention, but Dirk Nowitzki's season has only ended today when he decided he would undergo surgery on his ankle.

The forward played in Dallas win over the Portland Trail Blazers on Tuesday, but he did not travel with the team to Orlando yesterday in their loss against the Magic, as he was listed as out due to left ankle impingement.

Today, the sixth-leading scorer in NBA history made the decision to undergo surgery on his ankle, ending his season with the Mavericks.

The Mavericks announced on their website on Thursday that: "Nowitzki underwent surgical debridement of his left ankle. The surgery was performed by Dr. Eugene Curry and Dr. Daniel Worrel at the Carrell Clinic in Dallas."

While this might seem like it could potentially mean Nowitzki is calling it a day on his career as well, that is not the case at all. According to a report by ESPN's Tim MacMahon, the surgery is "relatively minor," and will not affect Nowitzki's decision on whether to play next season. 

The 39-year-old averaged 12.0 points and 5.7 rebounds in 24.7 minutes for the Mavs this season, playing 77 games in total, the most ever for a player in his 20th season. 

The team does have an option for Nowitzki's $5 million salary next season, but Mavs owner Mark Cuban has expressed his desire to see the forward come back and play another season despite his age and the surgery.

It was only back in December as well that Nowitzki stated his hopes of playing once more next season, as he said according to Dallas News: "As long as my body feels fine like it has so far, with no setbacks like last year when I missed two months, I'm looking forward to hopefully fulfilling my contract."

It's been a difficult year for the Mavericks as wins have been tough to achieve, but at least they can walk into next season knowing that Nowitzki will be on the court for one final run despite his recent surgery.

Listen HERE to the first episode of the new GiveMeSport NBA podcast, featuring former Cleveland Cavaliers General Manager David Griffin.

Enjoy, and please subscribe for all future episodes.