Bojan Bogdanovic had 21 points and five rebounds off the bench, and Deron Williams scored 17 for the Nets, who have won four of five.
Lopez scored the go-ahead basket with 1.5 seconds remaining in the third quarter to give the Nets an 88-87 lead.
Brooklyn pulled away for good when Joe Johnson converted a three-point play and Bogdanovic made a three-pointer to put the Nets ahead 109-100 with four minutes remaining.
The Nets (29-39) used an 11-0 run in the second half to take the lead — much different from Indiana's 110-85 romp in Brooklyn on Dec. 27.
But this time, the stakes were higher. A win for the Pacers would have put them in sole possession of eighth place in the Eastern Conference.
Instead, the Nets closed the gap in a crowded race for the final playoff spot.
After Lopez scored to give the Nets the lead, Bogdanovic hit a three-pointer and another basket, and Alan Anderson made a layup to give Brooklyn a 96-87 advantage with 9:54 left.
The Pacers went on a 9-1 run of their own in the fourth.
Scola converted a three-point play to bring the Pacers within a point with 8:04 remaining, but the Nets then managed to pull away.
at Detroit 107, Chicago 91: Reggie Jackson had 22 points, including 17 in the third quarter, and the Pistons came back from a 19-point deficit to beat the Bulls. The Pistons trailed 72-53 with seven minutes left in the third quarter, but got a combined 27 points and 13 assists from Jackson and fellow point guard Spencer Dinwiddie in the second half. Detroit had already taken an 80-79 lead by the start of the fourth, but its short-handed bench forced Coach Stan Van Gundy into a small lineup that included three guards along with Tayshaun Prince playing out of position at power forward. Prince, though, dominated the period on the defensive end, grabbing two early steals and pulling down nine rebounds.
at Memphis 97, Portland 86: Jeff Green had 23 points and Mike Conley scored 21 with nine assists to lead the Grizzlies to a victory over the Trail Blazers. Zach Randolph added 17 points for Memphis, which won its second straight. Marc Gasol had 13 points, and Tony Allen finished with 10 points and 11 rebounds. Damian Lillard led the Trail Blazers with 27 points and seven assists. LaMarcus Aldridge had 16 points, but didn't play in the second half because of an injury to his left hand. C.J. McCollum finished with 13 points, and Dorell Wright scored 10. The Trail Blazers also played the second half without starting forward Nicolas Batum, who was sidelined with lower back pain.
Phoenix 117, at Houston 102: Eric Bledsoe had a career-high 34 points and the Suns withstood a fourth-quarter charge by the Rockets. Bledsoe scored 23 by halftime and surpassed his previous career best of 33 points, set earlier this season, on a free throw with about a minute remaining. Phoenix led by 15 early in the fourth quarter when Houston used a 14-4 run, with five points from Josh Smith, to cut it to 105-100 with five minutes left. The Suns missed seven shots and turned it over three times as their big lead dwindled. Neither team had scored for about 2 1/2 minutes when P.J. Tucker made a three-pointer that started a 12-0 spurt by the Suns that pushed their lead to 117-100 and secured the victory.
at Golden State 106, Utah 91: Stephen Curry bounced back from his worst shooting performance of the season to score 24 points, Leandro Barbosa added a season-high 19 off the bench and the Golden State Warriors pulled away late to beat the Jazz. One day after shooting 4 of 17 in a win over New Orleans, Curry went 8 of 18 from the floor against a Utah defense that had been the NBA's stingiest over the past three weeks.