Together, they've logged 10 seasons of mostly disappointment with the Toronto Raptors.

Friday night, DeMar DeRozan and Amir Johnson wrote the perfect ending to the Raptors' 105-103 victory over the Boston Celtics that — finally — sent the Raptors into the playoffs for the first time in six years.

"It makes it feel all worth it, honestly, the hard work, the struggles, the nights going home where you're just frustrated and don't want to turn on sports," DeRozan said. "It really shows you that if you stick at it and don't give up — not to sound cliched — it definitely pays off."

DeRozan scored 30 points to top Toronto, including a fadeaway jumper with 34 seconds left. Johnson had a relatively quiet night with eight points and eight rebounds, but it was his putback on a miss by Kyle Lowry with seven seconds left that sealed the win.

"Amir knows," DeRozan said. "We've been through tough times here where we just look at each other like 'You can't give up now, you've got to learn from it, even when things are going bad.' That's what we did."

When reporters walked into the post-game dressing room, Johnson was on his phone with his grandma Dora.

"'Dora the Explorer,' that's what I call her," Johnson said, smiling. "She said she's proud.

"This team has worked so hard," he added. "We were playing our butts off, playing through injuries, we've had our ups and downs. But we made it. It was just coincidence at the end of the game that it was me and DeMar making two clutch shots, the players who have been here the longest, so it meant a lot to clinch our spot in the playoffs."

Terrence Ross added 17 points, while Greivis Vasquez finished with 15, and Jonas Valanciunas had 13 points and eight boards for Toronto (41-31).

Former Raptor Jerryd Bayless led the Celtics (23-49) with 20 points, while Jeff Green finished with 16.

The Raptors went into the night with a two-and-a-half game lead over Brooklyn for first in the Atlantic Division and tied with Chicago for the No. 3 seed in the East. They needed a win or a loss by the New York Knicks in Phoenix to secure their spot in the playoffs.

But the win didn't come easily against a team the Raptors had beaten in Boston 99-90 two nights earlier.

Against a team that has been all but mathematically eliminated from the playoffs, Toronto led by only single digits until late in the third quarter and took an 85-73 advantage into the fourth in front of a capacity crowd of 19,800 at the Air Canada Centre.

DeRozan scored Toronto's first 10 points of the fourth and his basket with 8:03 gave the Raptors a nine-point lead as they looked headed for certain victory. But the pesky Celtics fought back with a 15-2 run and a basket by Canadian Kelly Olynyk with 3:07 left put the visitors up by four.

The game was tied with 1:14 to go before DeRozan scored, then Rajon Rondo replied to even it up with 27 seconds left. Then with the crowd on its feet, Johnson darted in to tip in the winner.

The crowd went mad. The cheerleaders danced. Kool and the Gang's "Celebration" blared over the loudspeakers.

'It just sums up everything these past four seasons that we've been through, that it was all worth it. Since I've been here, the fans have been sticking behind us through the tough times, you can't ask for better fans than that.'- Raptors guard DeMar DeRozan

"My hat is off to all the guys who have come through here, to DeMar DeRozan and Amir Johnson, who've been through it all, and to the fans for being understanding and being patient," said Raptors coach Dwane Casey. "It was fitting for those two guys, because they've been through thick and thin and good times and bad times."

DeRozan said it was sweet to soak in the applause from the fans, and praised them in the post-game locker-room.

"It just sums up everything these past four seasons that we've been through, that it was all worth it," DeRozan said. "Since I've been here, the fans have been sticking behind us through the tough times, you can't ask for better fans than that. It ain't like these fans started coming around this season, our fans have been here from the gate, when we were playing bad, having 20-win seasons.

"Just to see it turn around and be able to share that with our fans is definitely cool."

Lowry, who had scored 20-plus points in the previous eight games, finished with nine points playing on a heavily-taped ankle after rolling it late in the first half when he stepped on Avery Bradley's foot. He limped to the locker-room, had it taped at halftime and returned to start the second half.

Toronto's first-round opponent will be determined over the final 10 regular-season games. If the playoffs started today, the Raptors would face the sixth-place Washington Wizards. Other potential first-round opponents: the Chicago Bulls and Brooklyn Nets.

By all accounts, the Raptors weren't expected to do much this season. The turnaround started after a blockbuster seven-player trade in early December sent Rudy Gay to Sacramento.

Casey said there's still plenty of work to be done, especially on the defensive end, before the playoffs begin. But he took a moment to talk about the growth of his team.

"It's understanding of what it takes, the belief that defence wins, the commitment of: togetherness wins, binding to the culture. . .," Casey said. "The guys who have bought in, they understand what it takes to win and they've seen the fruits of it. The roots are in the ground for what our culture is about."

Olynyk, a Celtics rookie, finished with 10 in 19 minutes. Olynyk was born in Toronto and spent 12 years here before moving to Kamloops, B.C., with his family. He grew up a Raptors fan — his mom Arlene was a scorekeeper for the NBA team. His dad Ken coached the University of Toronto basketball team for 13 seasons.

The Raptors got out to a slow start and trailed for most of the first quarter despite shooting 58 per cent, but came to life in time to put together a 32-26 lead going into the second.

A driving layup by DeRozan six minutes into the second quarter gave the Raptors a nine-point advantage, but the Celtics used a 13-3 run to take a one-point lead two minutes before halftime. Toronto took a 56-53 lead into the locker-room at the break.

The Raptors finally put together a double-digit lead in the third, taking a 12-point lead on a three by Vasquez with 1:48 to play.