Jimmy Butler scored 35 points and recorded a game-high 12 assists to lead the Miami Heat to a much-needed 129-122 win over the Dallas Mavericks.
Cody Zeller added 20 points while Max Strus and Kevin Love scored 18 each as Miami won their first game in four.
It puts them one win behind the sixth-placed Brooklyn Nets in the Eastern Conference as they chase the final automatic play-off berth.
Luka Doncic led Dallas with 42 points, 10 rebounds and eight assists.
But the Mavericks face the real possibility of missing out on the play-offs – just a year after they reached the Western Conference finals – as they sit in 11th place.
Above them in seventh are the New Orleans Pelicans, who maintained their push for the post-season with a 122-114 win against the Los Angeles Clippers.
Brandon Ingram scored 36 points while Jonas Valanciunas posted a double-double of 23 points and 12 rebounds as the Pelicans recorded their seventh victory in eight games.