Even before Boston found itself in the throes of its first losing streak in two months, coach Brad Stevens felt his team would be tested heading into this stretch of five games in seven nights.

After an initial stumble, the Celtics are hoping their latest victory puts them back on solid ground with only about a month left in the regular season.

Isaiah Thomas had 28 points and seven assists and Boston held on to beat the Orlando Magic 107-96 on Monday night.

Avery Bradley had 22 points and nine rebounds and Kelly Olynyk had 22 points off the bench in his fourth game back from a right shoulder sprain to help the Celtics even the season series with the Magic at two games each.

"It’s not easy just to go out there and start firing them up. My shoulder, not all the strength is back there," Olynyk said. "The first couple of games I was shooting the ball the way I wanted and it felt good leaving my hand, but I was short every time because I didn’t have the same strength.

"Today it was coming off free and easy."

Boston led by 14 early in the fourth quarter and ended the game on a 9-2 run after having its lead cut to four. It was the Celtics’ first home victory since their 14-game home winning streak was snapped on March 11.

"When (the bench is) playing well it’s even tougher for the defense to figure out who to stop," Thomas said. "Kelly stepped in today and had a hell of game. He made shots and we need him to do that."

Victor Oladipo led Orlando with 25 points and eight rebounds.

The Magic have lost four straight and eight of their last 10.

Injuries to key starters on both sides provided a different feel in the final matchup of the season between the teams.

Orlando’s frontcourt was missing center Nik Vucevic, who has been out with a groin injury since March 7.

The Magic saw a different look from the Celtics as well, with starting forward Jae Crowder sitting out for the fifth straight game because of a sprained right ankle.

The Celtics hit nine of their first 10 shots coming out of halftime to take their first double-digit lead of the night. Magic coach Scott Skiles called his team "a little bit soft" in a quarter they were outscored 20-12 in the paint.

But Boston started 1 for 10 to begin the fourth quarter, allowing the Magic to cut that deficit in half and get back into the game.

It didn’t last, though, as the Magic allowed Thomas and Bradley to score the Celtics’ final nine.

"We can’t have many mental mistakes," Oladipo said. "We don’t have room for error."

(Copyright (c) 2016 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.)

Join our Newsletter for the latest news right to your inbox