PJ Washington scored with 4.5 seconds left to help the Dallas Mavericks beat the Golden State Warriors 108-106.
The Mavericks, without Luka Doncic, led 105-99 late on but Stephen Curry levelled for the Warriors at 106-106.
Washington then scored a layup before Klay Thompson missed a three-pointer for the Warriors, whose six-game winning run came to an end.
Washington scored a game-high 32 points, while Curry top-scored for his side with 28 points.
Elsewhere, Xavier Tillman scored with 7.4 seconds left for the Boston Celtics as they held off a Sacramento Kings comeback to win 101-100.
The Celtics led by 19 points during the fourth quarter before a 16-1 run brought the Kings back into the game.
De’Aaron Fox scored a game-high 40 points for the Kings, including seven three-pointers, and put his side 100-99 in front with 27 seconds left.
But Tillman restored his side’s lead and they held on to win their 61st game of the season.
The Milwaukee Bucks, who were without Giannis Antetokounmpo, were beaten 117-111 by the Toronto Raptors, who ended a 15-game losing streak.
Gary Trent Jr top scored for the Raptors with 31 points, while Damian Lillard registered 36 points for the Bucks.
There were also wins for the Phoenix Suns, who beat the Minnesota Timberwolves 97-87, and the Indiana Pacers, who emerged 126-112 victors against the Oklahoma City Thunder.