TORONTO – Jason Terry scored only two points. Still, he made a big contribution to Boston’s latest victory with a pep talk before the fourth quarter Wednesday night.

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.

Courtney Lee added 15 points, Leandro Barbosa had 14, Avery Bradley 11 and Brandon Bass 10 as the Celts stayed 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. 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.

“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 for 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 5 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.