DeMarre Carroll scored 15 of his 22 points in the third quarter to help the Brooklyn Nets beat the Dallas Mavericks 109-104 on Wednesday night.
Trevor Booker had 16 points and 10 rebounds, Spencer Dinwidde added 19 points, and Caris Levert had 13.
Harrison Barnes had 17 points for Dallas, Maxi Kleber added a career-high 16, and Dwight Powell had 14.
Carroll put the Nets ahead for good at 78-76 on a 3-pointer with 2:03 remaining in the third quarter.
Brooklyn led by as much as nine points in the fourth quarter, taking a 106-97 advantage with 1:32 remaining on Joe Harris' 3-pointer. Dallas responded with a 7-0 run, cutting it to 106-104, before the Nets finally iced it with a pair of rebounds in the final 10.5 seconds.
Harris split a pair of free throws with 10.5 seconds remaining, but Brooklyn kept possession after the rebound went off a Mavericks player and out of bounds. Dinwiddie then missed a pair of free throws with 7.4 seconds left, but Booker grabbed a rebound, and Dinwiddie redeemed himself with a pair of free throws to complete the scoring with 5.2 seconds remaining.
Brooklyn struggled at the free-throw line, going 14 of 25 attempts. Dallas was 17 of 21.
Nets: Dinwiddie made his eighth straight start in place of D'Angelo Russell, who sustained a knee injury Nov. 11. ... Brooklyn led 48-47 at halftime.
Mavericks: G Yogi Ferrell played 10 games for Brooklyn during the 2016-17 season before getting release and signing a contract with Dallas. Ferrell had eight points.
Nets: Host Atlanta on Saturday.
Mavericks: Host the Los Angeles Clippers on Saturday.