Dirk Nowitzki announced his retirement after 21 years with the Dallas Mavericks while the Miami Heat’s Dwyane Wade marked the last home game of his career.

Tributes were paid to both players during their respective matches, with Nowitzki’s announcement coming after much speculation that this season would be his last.

The 40-year-old posted a season-high 30 points for the Mavericks in their 120-109 win over the Phoenix Suns, before breaking the news of his retirement to the Dallas crowd.

With the Mavericks having already been eliminated from play-off contention, the game was Nowitzki’s last at home, with a trip to San Antonio on Wednesday night set to be his final farewell.

Wade, who had already announced his intention to retire at the end of the 2018-2019 season after a 16-year career in the NBA, will also play his last game this week after Miami were eliminated from play-off contention.

The Heat beat the Philadelphia 76ers 122-99 at American Airlines Arena – but the Detroit Pistons beating the Memphis Grizzlies ended their post-season hopes.

Wade – who received a video tribute from former US president Barack Obama – marked his final home game with 30 points, embracing his teammates as he headed to the bench with 1:02 remaining.

His career will come to a close in Brooklyn on Wednesday.

Meanwhile, the Pistons will also travel to New York on Wednesday as they look to clinching a post-season berth when they take on the Knicks.

Ish Smith led the way with 22 points as Detroit posted a 100-93 victory against the Grizzlies to put them within touching distance of the play-offs.

They are just one win ahead of the Charlotte Hornets, who kept their own play-off dreams alive with a 124-97 win against the Cleveland Cavaliers.

Charlotte can beat the Pistons to the number eight spot in the Eastern Conference if they defeat Orlando at home on Wednesday and the Pistons fall in New York.

In Tuesday night’s other games, Stephen Curry left early with a foot sprain as the Golden State Warriors routed the New Orleans Pelicans 112-103, while Kawhi Leonard finished with 20 points in the Toronto Raptors’ 120-100 win against the Minnesota Timberwolves.

The Boston Celtics overcame the Washington Wizards 116-110, Donovan Mitchell tied his career high of 46 points in a 118-108 victory for the Utah Jazz over the Denver Nuggets and the Knicks beat the Chicago Bulls 96-86.

Elsewhere, the Oklahoma City Thunder fought back from a 14-point deficit in the fourth quarter to edge the Houston Rockets 112-111, while Maurice Harkless hit a buzzer beater to power the Portland Trail Blazers to a 104-101 win against the Los Angeles Lakers.

The Lakers confirmed on Tuesday night that president Magic Johnson – a five-time NBA champion with the franchise as a player – was leaving his role after two years.