NEW YORK -- Having lost three games in a row, the Dallas Mavericks, a staple in the NBA Western Conference playoffs for the past 11 years, knew that Friday night's game against the Brooklyn Nets was as crucial as it came.
"We need wins in the worst way, regardless of who we're playing," said Vince Carter, who scored 20 points against the Nets -- the franchise where he remains the No. 2 all-time leading scorer and a three-time All-Star, to lead the Mavericks to a 98-90 victory Friday night at the Barclays Center.
"Each game is important now," said Carter, who had his 20 points in 28 minutes off the bench. "We're trying to get in the playoff race. The three games we lost hurt us, so we had to get back in it."
The Mavericks improved to 26-32 overall and now trail Houston by four-and-a-half games for the eighth and final playoff spot in the Western Conference.
Dirk Nowitzki also had 20 points and grabbed eight rebounds for the Mavericks.
"We've had a few disappointing losses," Nowitzki said. "We got a big lead and put ourselves in position to win the game."
The Mavericks led by as many as 20 at 86-66 with 8:23 left, but held on to gain the win. The Nets (34-25) cut the lead to four at 94-90 on two free throws from Brook Lopez (19 points, nine rebounds) with 37.4 seconds left, but could not get any closer.
The loss was only the third for Brooklyn this season in 22 games against teams with a .500 or worse record. The Nets hurt themselves with 20 turnovers, several of which were unforced.
It was a vital game for the Nets, who have an eight-game road trip upcoming from March 20 through April 3, making every home game critical in their bid to secure a spot in the Eastern Conference playoffs. Brooklyn has only eight home games remaining after Friday night. They have won just three of their last nine home contests.
The Mavericks also received 17 points from O.J. Mayo.
Deron Williams scored a game-high 24 points to pace the Nets, but he also committed seven turnovers.
The Mavericks built a big lead by moving the ball around the perimeter to find open shots galore. Bench players Mike James and Jae Crowder added clutch 3-point baskets during the opening stages of the fourth quarter, as Dallas took control of the game.
"That's our game, move the ball around, spread the floor and look for open shots," Nowitzki said. "This was definitely a win we needed to have. We spread the floor and shot the ball well in the second half."
Mavericks head coach Rick Carlisle agreed.
"Dropping the last three put us in position that we needed one," Carlisle said. "We had a solid game, solid enough to beat one of the better teams in the Eastern Conference.
"We took advantage of our runs. We made a few mistakes down the stretch, so we'll take this win and run. I think our guys have been around long enough now to realize that each game we have is really big."
The two teams started off cold to start the third quarter, but the Mavs broke a 52-52 tie by scoring seven straight points midway through the period, five coming from Nowitzki on two free throws and a 26-foot 3-pointer.
When Mayo drove right at Lopez and put one in off glass, Dallas had a 59-52 lead with 7:13 remaining in the third.
The Mavericks maintained the pressure for the remainder of the quarter, pushing the lead to 77-63, outscoring the Nets 11-2 over the final 2:59 to take a 77-63 lead into the final period. Carter hit a straightaway 3-pointer and a driving layup during that stretch.
"That really put them on their heels," Carter said. "We had a terrible third quarter against Memphis (Wednesday night). We felt that they were withering away there. We had to stay focused and get it."
Dallas outscored Brooklyn, 29-14, in the third quarter -- a period that has plagued the Nets all season.
"We came out and had a couple turnovers early in the quarter," Nets interim head coach P.J. Carlesimo said. "We then got really flat after that. We didn't execute well, but worse, we just didn't play with any defensive energy and the score went from 10 to 20 in a short time.
"We just drifted back to what has been a problem for us," Carlesimo said. "When we don't score and turn it over, we don't play with the same kind of energy. The way we took care of the ball, you're not going to beat a bad team, much less a decent team."
Williams, who has regained his shooting touch of late, was once again on target for the Nets, hitting two from long range en route to 10 points in the first period. Williams hit two 3-pointers in an 8-0 run that gave the Nets a 21-20 lead, before Nowitzki scored on a layup to give the Mavericks a 22-21 lead at the end of the first period.
It was a first half that featured 18 lead changes, including five possessions in a row. Williams hit a driving shot with 1:31 left that gave the Nets their biggest lead at 49-45, but Mayo completed a conventional three-point play with just nine seconds left that sliced the lead to 49-48 at the half.