NEW YORK -- Paul Pierce climbed high for the dunk, Kevin Garnett went to the floor for a loose ball, and Brooklyn suddenly looked and sounded like Boston.
The Nets brought the two champions here so it would be like this, not the way it was for their last home playoff game.
''This is a totally different team, totally different feeling,'' guard Deron Williams said. ''I think we're poised to make a run.''
Joe Johnson scored 29 points, Pierce and Garnett brought a charge to their first playoff game in Brooklyn, and the Nets held off the Toronto Raptors 102-98 on Friday night for a 2-1 lead in the first-round series.
Johnson made the clinching free throws with 3.1 seconds left after the Nets blew almost all of a 15-point, fourth-quarter lead. Williams added 22 points and eight assists for the sixth-seeded Nets, who host Game 4 on Sunday night.
Pierce had 18 points, and he and Garnett provided the game's signature plays late in the second quarter, a reminder that the Nets brought the veterans here as much for their bravado as their basketball.
But all that experience almost didn't matter after the Nets made a series of mistakes down the stretch.
DeMar DeRozan scored 30 points for the Raptors, who have lost 13 straight road playoff games. Patrick Patterson added 17 points but missed two free throws with a chance to tie for Toronto, whose last postseason victory was May 6, 2001, in Game 1 of the Eastern Conference semifinals at Philadelphia.
''I missed. First big free throws I've ever missed in my life like that,'' Patterson said. ''Unfortunately, it (stinks) but all I can do is look forward to the next opportunity.''
Kyle Lowry fouled out with 15 points, forcing the Raptors to try to complete the comeback without their point guard. And they almost did.
''This team tried to throw haymakers at us and go at us, and we did a good job of battling back and staying in the game,'' Raptors coach Dwane Casey said.
Toronto charged back and was in position to tie when Patterson went to the line with 19 seconds left. But he missed both and Pierce knocked down two to make it 100-96, and Johnson then made two with 3.1 seconds to go after Amir Johnson's follow shot as Brooklyn held on.
''It feels good to win, but at the same time you know you can be a lot better,'' Pierce said. '''I'm looking for down the road, I'm looking for when it's like that Game 6 or 7, if we're ever in that situation with this team, it's going to come to those little things and we can't afford those small mistakes.''
The Raptors beat the Nets in their first trip here this season, one of only four home losses for Brooklyn in 27 home games since Jan. 1. Toronto had a franchise-record 22 home victories during the regular season, and Casey hoped his team could handle its first road playoff test.
But the Nets' experience was evident for the first three quarters, especially once Pierce and Garnett made their impression on the game.
The Nets' last playoff game here was a disappointment, a Game 7 loss to Chicago in the first round last year in which they came out with surprisingly little fire in a do-or-die game. They traded for Pierce and Garnett on draft night, and on Friday they brought to Brooklyn the playoff passion they showed for so many years together in Boston.
Toronto led 23-19 after one and held a small lead until late in the second. Joe Johnson's free throws tied it, Pierce knocked then a pair, and then he left Tyler Hansbrough standing still near the foul line, driving for a dunk that made it 45-41.
The dunk got the fans on their feet, but Garnett's intensity really got them in a frenzy. He dove on the floor for a ball that had been kicked, wrestling it away from Amir Johnson, and when he got up, held the ball high and screamed toward the fans behind the basket, then pulled out the part of his jersey that read ''BROOKLYN'' toward them.
Pierce later had a three-point play and a 3-pointer in the Nets' big finish to the third, his jumper with 2.7 seconds left making it 77-66. That felt like a huge lead in a series where neither team led by more than five points after three quarters in their four regular-season games and first two in the playoffs.
But after the Nets extended it to 15 in the fourth, Toronto began its comeback that fell just short.
Notes: Toronto is 3-16 on the road in the playoffs. ... The NBA announced Friday that Barclays Center would host the draft on June 26. Tickets go on sale May 21.