ORLANDO, Fla. -- The Orlando Magic trudged out of Boston this week, toting only embarrassment following a lopsided 31-point loss to the Celtics.

For a while it appeared as though the Magic would return the favor. Instead, the Celtics took advantage of Orlando's fourth-quarter meltdown and erased a 27-point deficit to hand the Magic an even more humbling defeat on their home floor, 91-83 on Thursday night.

Paul Pierce had 24 points and 10 assists, and E'Twaun Moore added 16 points off the bench to help Boston beat Orlando for the second time this week.

Pierce and Moore had 10 points each in the fourth quarter to surge past a Magic team that led by 11 points entering the fourth quarter before shooting 2 for 17 from the field in the final 12 minutes. They scored just eight points in the period.

"Everybody was big," Pierce said. "Obviously, when you got a rookie (Moore) who hasn't played too much to come in and do the things he did -- that's big for us.

"This team decided to stand up and fight."

Moore said the Celtics needed a game like this.

"It's definitely a confidence builder for our whole team," Moore said. "Knowing we can play with some of the best teams out there."

Dwight Howard led the Magic with 16 points and 16 rebounds. Jason Richardson added 13 points, and Ryan Anderson had 12.

The Celtics have won three straight for just the second time this season. It also was their fourth consecutive victory over the Magic, dating to last season.

Since a season-best, five-game winning streak, the Magic have lost three times in five games, including a 31-point defeat at Boston on Monday.

"We thought it was going to be easy after the first two quarters," Howard said. "We can't allow that to happen. We've got to change. We have to change what we do, and guys have to know their roles and do it. That's just the bottom line."

The Celtics disrupted the Magic's offensive flow in the fourth, so much so that it led to a pair of late, frustration technical fouls on Howard and Anderson.

Magic coach Stan Van Gundy said tempers boiled up so much that it got to a point where players were simply driving to the basket trying to make plays on their own.

"Their pressure, again, really pushed us sideways," Van Gundy said. "We got frustrated with the officials and we got totally off our game."

Asked if he thought the Celtics did better with Xs and Os late, Richardson said there wasn't a singular scapegoat issue.

"It was everything," he said.

After being mostly manhandled on both ends for three quarters, Boston found its energy in the final 12 minutes, sparked by Pierce and Moore.

The Celtics opened the fourth quarter with a 15-1 run and grabbed their first lead since the opening period, 79-76 with 7:32 to play.

The Magic went 0-for-7 from the field, missed 5 of 6 free throws and committed three turnovers during Boston's spurt.

A free throw by Pierce after Anderson's technical foul made it 84-78 with 3:47 remaining. The Magic got within 84-80 after a pair of free throws by Hedo Turkoglu, but no closer.

"That was a character builder for our team, it really was," Celtics coach Doc Rivers said. "It's all that we talked about at halftime. Not a big game plan, we didn't make any big changes. We just kept talking about it being a character builder for this basketball team.

"We needed every single guy today and that was terrific."

Early on, it seemed like the Magic's night.

In a reversal of its dismal performance in the first half of Monday's loss, Orlando led 58-37 at halftime on Thursday -- eclipsing its point total in the entire first game by a basket in the opening 24 minutes.

With three starters out, including center Jermaine O'Neal, Rivers was forced to start Kevin Garnett opposite Howard.

The move worked out early.

Howard was whistled for two quick fouls -- one while setting a screen, and the second defending Garnett about 15 feet from the basket. He was forced to the bench less than three minutes in.

The Magic picked it up on both ends without him, and closed the quarter on a 30-11 run to build a 16-point lead.

But all that energy evaporated when it counted.

Now the Magic, a team that was seemingly ready to turn a corner will have to look inward if they're going to become an elite team, Van Gundy said.

"We've got to get to where we can just play the game," he said. "I've got to find a solution to that."

Game notes

This marked the biggest lead the Magic have blown in a loss since 2001 when it blew a 22-point lead at Dallas. ... Magic owner Rich DeVos and former guard Nick Anderson presented Howard with a plaque to commemorate him passing Anderson as the Magic's career leading scorer. Howard broke the mark against Indiana earlier this week. ... Rivers was given his third technical foul of the season with 8:47 left in the first quarter. ... The Celtics played without G Rajon Rondo, who missed his fourth game because of a sore right wrist, G Ray Allen, who was out for a second game with an injured left ankle, and C Jermaine O'Neal, out because of a sore left knee. Rivers said Rondo is still in pain, and there is no timetable for his return.