Spencer Dinwiddie stole the show in Houston, stunning the Rockets with three 3-pointers in the final minute of regulation, then coming through with the go-ahead basket in overtime as the Brooklyn Nets came back for a 145-142 win at the Toyota Center.
On a night in which Houston's James Harden put up 58 points, the game ultimately belonged to Dinwiddie and the Nets, who walked out with a win despite trailing by as much as 14 points in the fourth quarter. They were still down by 11 with under three minutes remaining. But they outscored the Rockets 12-4 in the final 1:02 of regulation to get to overtime.
With the Rockets up 142-135 in OT, Treveon Graham hit a 3-pointer, and Dinwiddie found a rolling Jarrett Allen for a basket and a foul. Allen missed his free throw, but Graham grabbed the rebound and Dinwiddie took advantage of the extra possession by driving for a three-point play that put the Nets up 143-142 with 28 seconds remaining.
The Nets never gave up another point, holding the Rockets scoreless in the final minute of overtime, with two Joe Harris free throws with 1.6 seconds to go providing the final margin.
Dinwiddie finished with 33 points, shooting 13-for-22 and 4-for-8 from 3-point range with 10 assists.
It was still an 11-point Houston lead with under three minutes to go and a P.J. Tucker 3-pointer had the Rockets up 127-119 with just over a minute remaining. A pair of free throws from DeMarre Carroll and another by Harris made it a five-point game with 34 seconds to go.
Then Dinwiddie shocked the Rockets with his shooting spree, the last 3-pointer coming from 28 feet out with 8.4 seconds remaining to tie the game at 131, capping Brooklyn's stunning 46-point fourth quarter.
Allen grabbed a career-high 24 rebounds and scored 20 points for his first career 20/20 game, shooting 10-for-19. Graham scored a career-high 21 points, shooting 7-for-9 and 3-for-4 from 3-point range. DeMarre Carroll had 22 points, making 4-of-7 3-point attempts.
The Nets had seven double-figure scorers in total, with Harris adding 17, Rodions Kurucs 14, and D'Angelo Russell scoring 10 with seven assists.
The Nets shot 51.9 percent overall (56-108) and 44.4 percent from 3-point range (16-36).
The two teams combined for an NBA record 106 3-point attempts, with the Rockets breaking their own NBA record with 70 shots from 3-point range.
The win was Brooklyn's 15th in its last 20 games and got the Nets even on the season with a 23-23 record.
A wild first half ended with the Nets holding a 62-54 lead after leading by as many as 15 points in the first quarter.
A 26-9 run lifted Brooklyn to a 34-19 lead with 2:34 to go in the first quarter. The first nine points came from Kurucs on a pair of finishes at the rim and Harris on an elbow jumper and a 3-pointer. Allen, who put up a first-half double-double with 10 points and 10 rebounds, rolled to the rim to finish a Russell feed for a 19-10 Nets lead.
With Brooklyn up 25-19, Carroll knocked down a pair of threes around another by Dinwiddie as the Nets pushed the ball and took advantage of transition looks from deep. The 9-0 run made it 34-19 Brooklyn.
But Eric Gordon came alive to lead a 17-2 Houston run that bled into the second quarter and tied the game at 36.
With Houston leading 46-45, a Shabazz Napier 3-pointer launched a 13-2 Nets run. Graham drew a foul for a three-point play, Harris hit another three, Carroll made two free throws and Graham dropped in a floater for a 58-48 lead.
After two Gerald Green 3-pointers -- Houston took an NBA-record 35 threes in the first half alone -- a Dinwiddie transition dunk gave the Nets their eight-point halftime lead.
A 13-2 run propelled Houston to a 67-66 lead, and the Nets were still within 81-80 with under three minutes to go in the quarter. But that's when Harden scored the game's next 11 points, all in less than a minute, to put Houston up 92-80, its largest lead of the game to that point.
Kurucs got Brooklyn back on the board and Rondae Hollis-Jefferson converted a three-point play before two Harden free throws gave Houston a 94-85 lead going into the fourth quarter.
Harden struck again midway through the quarter, scoring five points in a 7-0 Houston run that stretched the Rockets' lead to 110-97 with under seven minutes remaining.
The Nets wrap up their two-game road trip in Orlando, then have three home games next week against the Kings on Monday, Magic on Wednesday and Knicks on Friday.