Kevin Garnett poured in 27 points and grabbed 10 rebounds to lift the Celtics to a 99-95 victory over the Raptors on Wednesday, stretching Boston’s win streak to six games and spoiling the return of Toronto’s Andrea Bargnani.

Rudy Gay had 25 points and 12 boards to top Toronto (17-32). Kyle Lowry added 17 points and eight assists, and Amir Johnson finished with 16 points and 12 rebounds.

Bargnani, in his first game since being shelved by an elbow injury for 26 games, had 13 points in 24 minutes.

Courtney Lee added 15 for the Celtics (25-23), who are missing all-star guard Rajon Rondo (season-ending anterior cruciate ligament tear). Paul Pierce had 12 points to go with 11 rebounds.

Leandro Barbosa, playing his first game back in Toronto since the Raptors traded him last March, scored 12 of his 14 points in the fourth quarter.

Neither team dominated what was a pedestrian affair until midway through the third quarter when Lowry, Gay and Bargnani worked like a well-oiled machine.

In one four-second stretch in the final minute of the frame, Gay drained a three-pointer, stole the ball off Jason Terry and found a sprinting DeRozan who finished with a layup.

The Raptors led 79-69 with one quarter left.

The Celtics fought back with a 21-6 run in the fourth, Garnett’s basket with four minutes left putting Boston up 90-85.

Gay cut Boston’s lead to three points with 43 seconds left, but a Jeff Green free throw put Boston up by four with 18 seconds left — and the game virtually out of reach.

Bargnani, the No. 1 pick in the 2006 draft, hadn’t played since tearing ligaments in his right elbow and sprained right wrist Dec. 10 at Portland — the Raptors went 13-13 in his absence.

Raptors coach Dwane Casey warned that Bargnani would have plenty of rust, but he had some decent moments Wednesday, altering shots with his length, and scoring on layups and jumpers. Midway through the third quarter he went hard to the hoop for a dunk that brought the Air Canada Centre crowd of 17,163 to its feet.

Trade speculation — the NBA trade deadline is Feb. 21 — has swirled around the seven-footer, who wasn’t playing with nearly the same intensity as he was last season before a calf injured derailed that campaign.

“Just getting that extra step out of him, like what happened early last year, is the key,” Casey said. “Whatever I have to do, kick him in the butt, be his friend, pat him on the back, hit him in the head. . . whatever it takes to get him to that level is going to be huge for our team going forward.”

The enigma that is Bargnani received a mix of cheers and boos when he checked into the game — he’s regularly criticized for his quiet demeanour and lacklustre play.

“I’m not a psychologist,” Casey said. “He’s a quiet man, and I think people mistake that for not caring. I do think he cares, I do know he cares, that’s the part of Andrea’s personality that no one has ever been able to grasp upon.

“But there’s a lot going on upstairs, he’s a smart guy, he does care, he’s very conscientious of where he stands with the team in the league.”

Gay led the way with eight points in a sleepy first quarter that saw the Raptors lead 23-20 going into the second.

Bargnani scored 11 in the second, his turnaround jumper giving Toronto a three-point lead — its biggest of the quarter. The Celtics went up by six on a 14-5 run and led 50-45 at halftime.

The Raptors outscored their visitors 34-19 in the third, DeRozan’s three-point play putting Toronto up 79-69 heading into the fourth.

NOTES: Toronto was missing Landry Fields for the second straight game (back spasms). . . The Raptors are at Indiana on Friday then return home for games against New Orleans and Denver.