The Celtics spent most of last night crawling back around the corner they thought they’d turned. After four straight wins and a new and needed commitment to up-tempo, unselfish basketball after the loss of injured point guard Rajon Rondo, it appeared as if this brief era of good feeling was turning into a pumpkin north of the border.

But with Leandro Barbosa arising for 12 of his 14 points and Kevin Garnett adding 11 of his season-high 27 in the fourth quarter, the Celts rallied for a 99-95 victory. They piled up 30 points in the final 12 minutes.

“I didn’t like how we played most of the game,” coach Doc Rivers said after earning his 400th victory on the Celtics sideline (he trails only Tommy Heinsohn’s 427 wins and Red Auerbach’s 795). “I just didn’t think we played with a lot of speed and a lot of force.”

With the Celts down 10 after being outscored 34-19 in the third quarter, Barbosa provided the speed, Garnett added the force, Paul Pierce and Jeff Green supplied defense and Jason Terry offered the motivational words.

“Jason doesn’t talk a lot, but he let guys know that that’s not the way we should play, the way we played for three quarters,” Rivers said. “His message was simple: 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.”

The Celts came into the last quarter looking well out of sorts. The Raptors had outscored them, 17-4, over the last five minutes of the third to take a 79-69 lead. It seemed the C’s needed just one more Raptors push and they would be on their way to defeat, but the visitors apparently still had some things to accomplish before leaving town.

It took the Celtics all of 3:17 to even the game at 79, scoring 10 straight points as they held Toronto to five missed shots and a turnover on the defensive end.