Updated

New York, NY (SportsNetwork.com) - Brook Lopez had 23 points and eight rebounds, Joe Johnson added 22 points, eight boards, six assists and three steals and the Brooklyn Nets defeated the New York Knicks 98-93 on Tuesday night.

Deron Williams posted 19 points, five boards and five helpers for the Nets, who are 3-2 on the heels of a five-game losing streak.

"Hopefully we can build on this. This was a good win," Brooklyn coach Lionel Hollins said.

Carmelo Anthony tallied 20 points, nine rebounds and six assists for New York, which has dropped five straight to fall to 4-15 on the season.

The Knicks trailed by as many as 16 in the second half and 13 in the fourth quarter when Jarrett Jack's jumper staked Brooklyn to an 81-68 advantage with 9:27 left.

New York responded with an 11-2 run, with Pablo Prigioni's 3-pointer capping the surge and clawing it within 83-79 midway through the frame. The Nets countered by scoring the next six points as Johnson's left baseline floater and running layup in the paint increasing their cushion to 89-79 with 4:29 to play.

A Jose Calderon trey whittled the gap to 94-91 with 1:19 to go and Johnson turned the ball over at the other end. Cole Aldrich missed a layup, but got his own miss and dished to Anthony beyond the arc, but his triple didn't drop. Johnson sunk a pair of free throws at the other end before Calderon hit a jumper on New York's ensuing touch to get it within 96-93 with 41 seconds left.

Kevin Garnett was unable to finish a layup but Anthony misfired from beyond the arc for the Knicks and Johnson sunk two free throws to seal the outcome with 4.5 seconds on the clock.

"Hopefully we can do a better job for 48 minutes," Calderon said.

Earlier, Brooklyn raced out to a 10-2 start and led 27-18 after a quarter of play.

The Nets were up 49-45 heading into the break and took an 77-64 cushion into the fourth.

Game Notes

Brooklyn held a 49-40 rebounding advantage ... The Knicks scored 22 points off 14 Nets turnovers ... The Nets had a 48-26 points in the paint advantage ... New York was 12-of-14 from the foul line.