NEW YORK -- Guard Deron Williams scored eight of his season-high 25 points in the fourth quarter, and the Brooklyn Nets led for the final 40 minutes in a 104-96 victory over the Boston Celtics on Tuesday night at the Barclays Center.
The Nets (7-14) posted consecutive victories for the first time this season.
Williams returned after missing nine games with a sprained left ankle and made 10 of 16 shots in his best shooting night of the season. He added seven assists.
Brooklyn shot a season-high 55.7 percent (39-for-70).
Nets center Brook Lopez scored 16 of his 24 points in the first half, and he finished 10-for-13 from the floor. He reached 20 points for the fourth time in six games since returning from a right ankle injury.
Guard Alan Anderson added 15 for the Nets. Center Andray Blatche chipped in 11 and nine rebounds, helping Brooklyn outscore Boston 48-30 in the paint.
Brooklyn forward Kevin Garnett contributed 11 points and nine rebounds, while forward Paul Pierce had four points and seven rebounds in the duo's first meeting with the Celtics since last July's blockbuster trade. Garnett reached double figures for the third time this season. Pierce came off the bench for the fourth time in his career and the first time since Feb. 9, 2007, against the Nets at the Meadowlands.
Guard Avery Bradley scored 22 points for the Celtics, who shot 43.8 percent (35-for-80) while seeing their three-game winning streak end. Guard Jeff Green added 18 points for Boston, while forward Jared Sullinger and guard Jordan Crawford chipped in 15 apiece.
The Celtics (10-13) were within 89-81 with 8:28 remaining, but Williams scored five consecutive points with a layup, a pull-up jumper and a free throw. Boston was within eight after Bradley's 19-footer with 3:31 left before Williams hit a 15-foot fadeaway to restore Brooklyn's 10-point lead.
Forward Brandon Bass converted a tip-in with 2:23 remaining, and the Celtics were within 96-90. After Bass split a pair at the line with 1:53 left, Garnett did the same on the other end after getting fouled by Bass. The Nets sealed the win on a long jumper by guard Joe Johnson with 52 seconds left.
The Nets trailed 14-13 when Pierce checked in with 6:27 remaining and outscored the Celtics 17-7 the rest of the first quarter for a 31-20 lead. Brooklyn took a 37-27 edge early in the second and closed out the first half on a 9-2 run for a 56-47 halftime lead.
Boston opened the second half with a 13-4 run and forged a 60-60 tie on a 3-pointer by Sullinger with 9:39 remaining, forcing the Nets to call timeout. Brooklyn avoided its usual poor third-quarter tendencies by ripping off 10 straight points as part of an 18-6 run that extended the lead to 78-66 with 4:08 remaining and helped the Nets take an 85-72 edge into the fourth.
NOTES: Nets F Paul Pierce came off the bench for two reasons, according to coach Jason Kidd, who said that he wanted to get him comfortable with the glove on his hand and that he didn't want to press him into the starting lineup. ... Kidd declined to address comments made by former Boston Celtics coach Doc Rivers to Bleacher Report about Pierce and Garnett not being able to be effective with limitations on their minutes. "That's Doc's opinion," Kidd said. "I respect that opinion, but minutes restrictions are due to games being out of reach." ... Boston rookie F Kelly Olynyk ramped up his basketball activities but missed his ninth consecutive game due to a sprained right ankle. ... Celtics G Rajon Rondo said at Tuesday morning's shootaround that he would meet later this month with the surgeon who repaired the torn anterior cruciate ligament in his right knee. However, until he gets clearance to resume full-contact drills in practices, he is not close to returning.