DALLAS (Ticker) -- The best shot of Jason Richardson's career spoiled a near career-best for Dirk Nowitzki.
Richardson scored 40 points and hit a spinning, leaning 3-pointer as time expired as the Golden State Warriors stole a 122-121 victory from the Dallas Mavericks, who wasted a season-high 51 points from Nowitzki.
Richardson's remarkable shot capped a stunning comeback from a six-point deficit in the final 35 seconds. It came one possession after teammate Derek Fisher had a tying 35-footer waved off because it came after an intentional foul.
Nowitzki fell two points shy of his career high. He made 16-of-24 shots and 16-of-17 free throws, although the lone miss from the line helped Golden State's comeback.
Darrell Armstrong made two free throws to give the Mavs a seemingly safe 116-110 advantage with 35 seconds left. But Fisher made a jumper five seconds later and Nowitzki split a pair of foul shots.
Fisher missed a 3-pointer and Nowitzki gathered the rebound. But Fisher made a steal, leading to Troy Murphy's three-point play that cut the deficit to 117-115 with 18 seconds left.
Armstrong went 1-of-2 from the line and Richardson and Jerry Stackhouse traded a pair of free throws, leaving Dallas with a 120-117 lead. Fisher raced upcourt and was fouled by Jason Terry before firing a long 3-pointer that went in but did not count.
Fisher netted two from the line with five seconds left and Terry split a pair with just 4.7 seconds to go. Richardson corralled the rebound, dribbled through defenders into the frontcourt, spun and launched a runner that banged in at the buzzer.
Richardson made 14-of-23 shots - including 5-of-10 from the arc - and three steals. Mike Dunleavy added 21 points and eight rebounds and Fisher had 17, seven assists and six steals for the Warriors, who improved to 1-1 on their three-game road trip.
Terry had 29 points and seven assists for the Mavericks, who lost for just the second time in their last 21 home games. However, it was a costly one as Dallas (53-16) fell one-half game behind San Antonio for the best record in the Western Conference.
The Mavericks lost both home meetings with the Warriors on last-second shots. On December 30, Baron Davis buried a 20-footer with five-tenths of a second remaining for a 111-109 win.