Dorian Finney-Smith hit a go-ahead 3-pointer with 17.3 seconds remaining and the Dallas Mavericks rallied after squandering a late lead to beat the Denver Nuggets 116-115.
Nikola Jokic had a chance to tie the game with 12 seconds remaining, but missed the first of two free throws.
Spencer Dinwiddie hit both free throws to help seal the win for the Mavericks.
Tim Hardaway Jr. scored a season-high 29 points and Luka Doncic recorded his 52nd career triple-double with 22 points, 10 rebounds and 12 assists.
Aaron Gordon had 27 points, while Nikola Jokic added 19 points, eight assists and eight rebounds for the Nuggets.