TORONTO (AP) -- Jason Terry scored only two points. Still, he made a big contribution to Boston's latest win with a pep talk before the fourth quarter.
Kevin Garnett scored a season-high 27 points with 10 rebounds, Paul Pierce had 12 points and 11 rebounds, and the Celtics won their fifth straight game by beating the Toronto Raptors 99-95 on Wednesday night.
Courtney Lee added 15 points, Leandro Barbosa had 14, Avery Bradley 11 and Brandon Bass 10 as the Celtics remained unbeaten since losing guard Rajon Rondo to a season-ending knee injury.
Garnett scored 11 points in the fourth quarter as the Celtics rallied from a 10-point deficit to snap a two-game skid in Toronto. Boston had lost three of its last four in Canada.
"We're fighters," Garnett said. "We're a team that's going to compete for 48 minutes. It's not always pretty. We're not perfect, we're human beings. But we play hard, we do our best to go out and try to perfect the game plan."
Boston's turnaround came after Terry harangued his teammates for their sloppy play through three quarters.
"His message was simple," Celtics coach Doc Rivers said. "'The ball will find the open guy. You don't have to dribble around and create your own shot. We've got enough scoring. Space the floor and play together.' And I think that's what we did."
Terry teamed with Garnett, Pierce, Barbosa and Jeff Green as the Celtics went small in the fourth to engineer their comeback.
"It felt like we didn't have the pace we wanted all game long until that fourth quarter," Pierce said. "Once we picked the pace up we got the lead and were able to win the game."
The victory also ended a three-game road losing streak for the Celtics, who had dropped 11 of 14 away from home.
"This is a good win for us because we didn't have it at stages," Rivers said. "We just kind of kept looking for the right lineup, the right group."
It was Rivers' 400th win with Boston, making him just the third Boston coach to reach that mark. Only Tom Heinsohn (427) and Red Auerbach (910) have more victories with the Celtics.
"That's cool," Rivers said. "To be behind those two guys is pretty special for me."
Rudy Gay led the Raptors with 25 points and a season-high 12 rebounds. Kyle Lowry scored 17 and Amir Johnson had 16 points and 12 rebounds as Toronto lost for the 10th time in 13 games.
Andrea Bargnani returned after missing 26 games with a torn ligament in his right elbow to score 13 points for the Raptors.
"He gave us some good minutes," Toronto coach Dwane Casey said. "I thought he wore down a little bit and I didn't want to wear him down too much."
DeMar DeRozan also scored 13, making five of 16 field goal attempts.
Trailing 79-69 to begin the fourth, Boston tied it with a 10-0 run. Barbosa completed a three-point play, Garnett hit a layup, Terry made a pull-up jumper and Garnett tied it with a three-point play of his own.
"He had it going so we wanted to milk that," Pierce said, referring to Garnett. "He's been phenomenal in this stretch and he carried us tonight offensively."
Alan Anderson stopped the run with a layup but the Celtics reclaimed the lead when Barbosa hit a 3-pointer, then was fouled while making a layup on the next possession. Barbosa missed the free throw, but Boston led 86-85 with 5:50 to go.
Pierce made two from the line and Garnett followed with a layup, giving the Celtics a 90-85 edge with 4:02 left.
Gay tipped in a rebound with 42 seconds remaining, cutting it to 96-93, but Green made one of two from the line to put the Celtics up by four with 17 seconds left.
"We had some defensive letdowns that we couldn't come back from," Gay said.
Gay scored eight points in the first and DeRozan added six as the Raptors led 23-20 after one. Bargnani scored 11 in the second but Boston got 10 from Pierce and eight from Garnett to lead 50-45 at halftime.
The Raptors took advantage after Garnett picked up his fourth foul with 6:48 remaining in the third and was replaced by Jason Collins. Toronto led 73-69 with 43 seconds left when Gay hit a 3, then forced a steal off the resulting inbounds pass and fed DeRozan for a dunk. DeRozan was fouled on the play and made the free throw to put the Raptors up 79-69 heading into the fourth. Gay scored 13 points in the third while Lowry had 10.
"I didn't like how we played most of the game," Rivers said. "We just kind of hung in there."
NOTES: Toronto F Landry Fields (back spasms) missed his second straight game. ... The Raptors went 13-13 without Bargnani. ... Gay's double-double was his first since joining the Raptors from Memphis in a three-team trade last week. ... Boston had at least five players score in double figures for the fourth straight game. ... Toronto had 12 steals, one shy of its season high. ... The Celtics host the Lakers on Thursday night.