NEW YORK -- Joe Johnson scored 27 points, including a fall-away 19-foot jumper at the buzzer, giving the New Jersey Nets a thrilling 107-105 double-overtime victory over the Detroit Pistons on Friday night at the Barclays Center.
The victory enabled the Nets (13-9) to win for the second consecutive time after five losses. The win also snapped a four-game home losing streak. The Pistons (7-18) fell to 2-12 on the road.
The two teams went back and forth through the fourth quarter and two overtimes. Detroit had chances to win the game in regulation and at the end of the first overtime, but misfired on both potential game-winners.
Detroit scored the first three points of the second overtime to take a 103-100 lead, then the Nets got a driving basket from Gerald Wallace, who also scored 25 points, to slice the lead, setting up Johnson's first heroics.
Johnson nailed a floating running jumper in the lane with 26.2 seconds left in the second OT to give the Nets a 105-103. But an alert Kyle Singler scored on a rebound basket with 11 seconds left, giving the Nets the final shot that Johnson nailed.
The Nets also received 17 points from Deron Williams and 16 from Andray Blatche before he fouled out in the first overtime.
Brandon Knight scored 22 points and Rodney Stuckey added 19, eight of which came in the extra sessions, to pace the Pistons.
In the first overtime, Stuckey scored six points, including a floater in the lane with 41.7 seconds left that gave the Pistons a 100-98 advantage.
However, Johnson drove to the basket and hit a tough shot with 18.7 seconds that tied the game once again at 100-100. Stuckey misfired on an 18-foot jumper as time expired, as the two teams headed to the second overtime.
Knight gave the Pistons the lead with a driving layup to start the second overtime and Jason Maxiell added a free throw to push the lead to 103-100. The Pistons secured two offensive rebounds after Maxiell's miss to keep the possession going. The Pistons misfired three times before the Nets grabbed a defensive rebound.
The Nets then outscored the Pistons, 7-2, over the final 2:20 of the second overtime to secure the win.
During the fourth quarter, Wallace scored six straight points, including a tip-in off a Johnson miss, that tied the game at 90-90 with 20.7 seconds left.
Knight missed a 17-foot jumper with 0.7 seconds left that would have won the game for the Pistons, sending the game to overtime.
In regulation, Detroit out rebounded Brooklyn, 48-33, including a 15-5 advantage off the offensive glass.
After trailing by as many as 17 in the first half, the Pistons made a strong comeback in the third quarter, spearheaded by the athleticism of center Greg Monroe, who scored six early second half points to bring Detroit to within six (64-58) with 8:15 left in the third quarter.
Monroe had 10 points in the third quarter, including a driving left-handed scoop shot off the glass that cut the lead to a single point at 66-65 with 4:56 remaining in the third.
The Pistons took the lead on a conventional three-point play by Rodney Stuckey with 3:02 left in the third and eventually extended the lead to seven at 77-70 on a free throw from Knight.
It marked the second straight home game that Brooklyn blew a 17-point lead. The Pistons outscored the Nets, 30-14, in the third quarter.
The Pistons controlled most of the play through the first quarter and into the second, especially getting second chance points off offensive rebounds. The Pistons led by as many as four (37-33) in the first half.
However, midway through the second quarter, Johnson caught fire, helping the Nets take their first lead since early in the first period, 40-37. Johnson nailed a lane jumper, then another on a fall-away shot from the left flank.
The Nets pushed the lead to nine (47-38) on a rebound basket with 4:31 left by Blatche, who followed with a tough 17-foot jumper.
Gerald Wallace calmly canned a wide-open 3-pointer with just 1:23 remaining, giving the Nets a commanding 57-40 lead. Brooklyn had a 59-47 lead at the break.
Wallace had 15 and Johnson 14 at halftime, with both players connecting on 6-of-8 from the floor. The Nets shot 56.1 percent from the floor for the first half compared to 41.9 for Detroit, which was led by Brandon Knight's nine points over the first two periods.
NOTES: After missing the previous seven games with a sprained right foot, Brook Lopez made his return to the Nets' lineup. "I feel pretty good," Lopez said before the game. "I've really been itching to get back out on the floor with my teammates for a while now, especially while we were losing." The Nets were 2-5 without Lopez in the lineup. When Lopez injured the foot, he was the Nets' leading scorer at 18.5 points per game. Nets coach Avery Johnson said that, for the time being, Lopez's playing time will be restricted. ... Pistons coach Lawrence Frank remains on top of the Nets' list for coaching wins with 225. Frank led the Nets to two Atlantic Division championships in 2004 and 2006. ... Frank is in his second season with the Pistons. ... Williams left the game with 1:41 in the first period after he was pushed from behind by Jason Maxiell. He limped off the court and was in obvious pain in his upper left leg when he hit the Nets' bench to receive attention from trainer Tim Walsh.