Updated

Toronto, ON (SportsNetwork.com) - The Brooklyn Nets will get their shot at the Heat in the second round of the playoffs after narrowly ousting the Raptors on Sunday in front of a rabid Toronto crowd hosting its first Game 7.

The Raptors nearly blew the roof off Air Canada Centre with a furious late comeback, but Paul Pierce blocked Kyle Lowry's potential game-winner in the lane as the seasoned Nets pulled out a frantic 104-103 victory.

The first Game 7 win in Nets history did not come easy, as Toronto cut a seven-point deficit with two minutes remaining to one down the stretch.

Terrence Ross drove for two to pull the Raptors within 104-103, then stole Shaun Livingston's inbounds pass and threw the ball out-of-bounds off Pierce's leg to give the hosts one final chance with 6.2 seconds to go.

Lowry was triple teamed at the top of the key and had the ball knocked away by Kevin Garnett before regrouping in the lane. With time ticking away and Pierce in his face, Lowry rose from six feet out, took some slight contact and had it batted away as the buzzer sounded to end an incredibly tight series.

"They did a good job trapping. I didn't get the shot I wanted to get off," Lowry said of the final play.

Joe Johnson led the sixth-seeded Nets with 26 points, Garnett added 12 points and 11 rebounds and Marcus Thornton stepped up with 17 points off the bench for the Nets, who will open their next series against the Eastern Conference's No. 2 seed in Miami on Tuesday.

Brooklyn swept the four regular season meetings against the two-time defending champions, though all were decided by a single point.

"We know we can beat them, but there's a difference between regular season and the playoffs. It's going to take a collective effort," Johnson said.

Lowry finished with 28 points to pace the Raptors, who never led in the second half while trying to clinch their first playoff series win since 2001.

The Nets led by 11 early in the fourth and were on top, 98-89, before a 10-3 Raptors run cut the margin to two with 25 seconds to go.

Deron Williams, who was nursing an ankle injury, went 1-of-2 from the foul line to keep it a one-possession game, and Lowry banked in a runner at the other end for a 102-101 game with 16.7 ticks showing.

Livingston's two free throws preceded Ross' quick bucket and the thrilling finish.

Despite their early exit, Raptors head coach Dwane Casey was thinking positive about the potential of this young bunch.

"No one gave us a snowball's chance in you-know-where that we would be here," Casey said. "These guys are going to be growing in the future."

The Raptors were in front, 28-26, after the first quarter, but they never led the rest of the way after the Nets rattled off 11 straight points early in the second.

Thornton scored four of his 14 first-half points during the surge, including two free throws that gave Brooklyn a 41-34 lead midway through the second.

The Nets' largest lead came early in the third when Williams sank two free throws to give the visitors a 67-55 cushion.

DeMar DeRozan's buzzer-beating 3-pointer cut the Raptors' deficit to 81-73 entering the fourth. DeRozan totaled 18 points on 5-of-12 shooting while battling the flu.

Game Notes

The Nets were 0-2 in Game 7s, including a loss to Chicago in last year's first round ... Toronto's only other Game 7 came in 2001 in a loss to the Philadelphia 76ers ... Brooklyn advanced past the first round for the first time since 2007 ... Amir Johnson finished with 20 points and 10 rebounds despite dealing with foul trouble in 22-plus minutes on the floor ... Williams and Pierce netted 13 and 10 points, respectively.