BOSTON — When the Boston Celtics started playing better defense, the game swung in their favor. It didn’t hurt that they hardly missed any shots down the stretch, either.

Rajon Rondo had 13 points, 15 assists and seven rebounds to lead balanced scoring that carried the Celtics to a 109-92 victory over the Orlando Magic on Wednesday night.

“I think we just turned up the heat,” forward Jared Sullinger said when asked what turned the game around.

Brandon Bass scored 18 points, and Jeff Green and Sullinger each finished with 16. Kelly Olynyk added 15 points for Boston, which won its second in a row after a three-game losing streak.

Earlier in the game, Boston connected on five 3-pointers during a run that turned a 10-point deficit into a three-point halftime edge.

“I thought we played well after the middle of the second quarter on,” Coach Brad Stevens said. “I was excited how we got better and better.”

The Celtics sealed the win by hitting 13 of their 19 shots in the final period.

Nikola Vucevic had 18 points with 13 rebounds, and Tobias Harris scored 17 for the Magic, who have lost four of five.

“I think overall you give credit to Rondo for his ability to orchestrate things,” Orlando Coach Jacque Vaughn said. “They made shots early. I think Sullinger got off a little bit early for them. That kind of set the tone.”

The game was tied at 63 early in the third quarter, but the Celtics went on a 14-6 spree over the ensuing 6 minutes en route to a 78-73 lead heading into the fourth. Green scored eight points during the run.

Boston then scored the initial five points of the fourth, opening an 83-73 advantage on Olynyk’s three-point play after he was fouled driving the lane for a crowd-pleasing dunk. The Celtics hit nine of their first 10 shots in the first 7 minutes of the fourth, keeping the Magic from making a charge.

Orlando had its deficit in single digits before Boston went on a quick 6-0 spurt to take a 103-88 lead on Phil Pressey’s easy drive to the basket with 4:11 to play.

During the fourth, Boston got a number of good shots and faced little resistance driving down the lane.

“They were scoring at will on us, basically,” Harris said. “You’re not going to beat teams if you don’t play defense.”

The Celtics held a 56-53 halftime advantage.

Orlando opened a 47-37 edge late in the second quarter before Boston went on a 19-6 spurt.

Celtics guard Marcus Smart missed his second straight game with a strained left Achilles.