NEW YORK (AP) -- Frustrated with the lack of playing time in his first year in the NBA last season, Brooklyn Nets reserve forward Mirza Teletovic stayed composed and patient.
Now with a chance to contribute, Teletovic is coming up big for the Nets.
Teletovic scored 24 of his career-high 34 points in the second quarter and the Nets held on to beat the Dallas Mavericks 107-106 Friday night for their fourth straight win.
''Confidence is very important. With the confidence it's so much easier to make shots, to move around, to play and do anything on the court,'' said Teletovic, who shot 12 for 18 from the field including 7 of 11 beyond the 3-point arc.
''I think it's very important to have patience and wait for your moment. You have to be ready when your name is called. If you're not ready, you can't do anything.''
The Nets improved to an NBA best 9-1 in January.
''I think just the opportunity for him playing, but also his work ethic,'' coach Jason Kidd said. ''He just doesn't show up on game day shooting. He's been working extremely hard at this game. I think also, a big credit goes to his teammates because they believe in him. As much as coaches believe in him, his teammates in that locker room believe that he's going to do the right thing when he has the ball.''
Paul Pierce had 12 points and Kevin Garnett added 10 points and 11 rebounds for Brooklyn, which has won seven straight at home, a season-high.
Former Net Vince Carter had 19 points and Dirk Nowitzki added 18 points for the Mavs, who lost their second straight game.
Brooklyn almost blew a 11-point lead after Teletovic hit a 3-pointer to make it 100-89 with 4:35 left in the fourth quarter.
Dallas then mounted a late rally, going on an 11-5 run to close in within two points with 8.1 seconds left in the game.
Deron Williams, who came off the bench for the third straight game and posted 18 points and dished out 11 assists, hit one of two free throws to extend the Nets' lead to 103-98 with 27.3 left.
The Mavs cut the lead down to 103-100 after Donta Ellis made a layup and Brooklyn was able to quickly increase it to 105-100 after Ellis sent Pierce to the free throw line for a pair of successful shots. Shawn Marion managed to bring Dallas within three points after two free throws with 10.8 left to make it 105-102.
Nowitzki then got fouled by Pierce. He hit the first free throw that made it 105-103 but missed the second attempt. Pierce and Andrei Kirilenko each hit a pair of free throws to make it a 107-103 game before Ellis hit a 3-point before time expired.
Brooklyn forced 15 turnovers and scored 23 points off of them.
''When you give up 23 points off turnovers in a one possession game, it's another story teller of the reason we lost,'' Dallas coach Rick Carlisle said. ''We were just poor defensively. Mirza Teletovic hit his first couple of shots and we just let him keep going and you just can't do that.''
Nowitzki shot 5 for 15 from the field and hit just two 3-pointer in eight attempts, crediting his former teammate, Kidd, who was on the 2011 Dallas championship team, with the game plan that had him off throughout the night.
''They didn't stop me from getting the ball but once I got it they double-teamed me pretty good'', Nowitzki said.
Teletovic and Williams got it going for the Nets in the second quarter after they trailed 21-18. The reserve forward Teletovic tied it 23-all with the first of six 3-pointers he made in the period. He scored 19 of the Nets 23 points in the first six minutes to give them a 41-33 lead with 5:51 left.
For Williams, it was his third straight game off the bench since returning to the Nets from a left sprained ankle. The Nets point guard had only one turnover in 35 minutes.
Williams understood the tough time that Teletovic went through last season and commended him for the way he handled the tough situation.
''It speaks a lot about him. (He was) definitely frustrated a lot last year with his lack of playing time. Mirza's a competitor and he's been one of the top players in Europe for a long time,'' he said.
NOTES: Ever since Kidd switched to a starting lineup of Pierce, Garnett, Joe Johnson, Alan Anderson and Shaun Livingston, the Nets have gone 7-0 this season. All seven wins have come during their last eight games. . Garnett and Pierce travel to Boston for their first game there Sunday night. Both players did not play when the team traveled there for a preseason game in October.