Anderson had five threes — all in the first half — and grabbed 11 rebounds to lead the Magic. Howard posted his 20th double-double of the season.

Orlando fell two shy of its season high for threes and set a team record with 42 attempts.

Anderson said as much as it might have looked as though the Magic were just jacking up threes, there is a definite method to their attack when they get hot from the outside.

"If somebody starts rolling, then all the attention's going to be on them. Then we'll swing it around and we've got another shooter," Anderson said. "I think when the crowd gets into it, when we have great energy as a team and we're being really unselfish and moving the ball, it is contagious."

The Magic have won four of five since their season-high four-game losing streak. They have also beaten Miami in nine of their last 11 meetings in Orlando.

Dwyane Wade led the Heat with 33 points, but had only 11 after halftime. LeBron James added 17 as the Heat had their three-game winning streak snapped.

"They set the tone this game, right from the get-go," Heat coach Erik Spoelstra said. "We were able to get into a little bit more of an aggressiveness and attack. A little bit more of a disposition in the second quarter, but they were able to sustain it longer and more consistently than we were able to."

In the middle of a stretch of 20 games in 32 days before the All-Star break, the Magic got a rare day off from game action Tuesday. They seemed energized from the opening tip against the Heat, racing to a 17-point lead in the first half.

That cushion was 16 at the start of the fourth quarter, thanks to all those threes.

The Heat got within 89-80 on a basket by Chris Bosh before Jameer Nelson's three from the corner pushed the Magic's advantage back to 12 with 3:53 to play. The Heat never got closer.

"I thought we did a good job of gathering ourselves," Van Gundy said. "We held our composure and nobody seemed the least bit worried. We just kept making plays."

Orlando was shooting better from the three-point line than from the field at one point in the fourth quarter. The Magic finished the night at 42% from the floor (35-for-83) and 40% (17-for-42) from three-point range.

Miami shot 47% from the field (36-for-76) but had only five three-pointers.

The Heat also held a 40-30 advantage on points in the paint, but Orlando led 23-9 in second-chance points.

Anderson's three-pointer gave the Magic their biggest lead of the first half at 44-27.

The Heat responded by closing the half with a 24-9 spurt — including the final 12 points by Wade — to go into halftime trailing by only three.

Wade finished the half with 22 points, while Anderson's five threes and 24 points paced the Magic.

Howard had 13 points and 13 rebounds in the opening 24 minutes.

"They shot the three extremely well, and the big fella in the middle took care of his 20 and 20 once again," James said. "Sometimes you have to pick your poison, but we gave up both tonight. They are an extremely tough team to beat when they are making the threes and the big fella is doing what he wants."

Magic forward Glen Davis, who played his second game since a two-game team suspension for a verbal spat with Van Gundy, said he thought the biggest takeaway for the team was how it was able to stay together down the stretch and withstand the Heat's late run.

In the preseason, it was Davis who preached to his new teammates after his trade from the Boston Celtics about how important a true family atmosphere would be to prolonged success this season.

He thought Wednesday was a big step toward that.

"That's what it's about, taking the punch and keep fighting," Davis said. "That's what we did. We knew (Miami) was going to make their run because they're a great team. But we just made sure we didn't buckle or get out of control. We stayed in control, and we executed to the end."

Notes: It was Howard's sixth game this season with at least 20 points and 20 rebounds. … Heat point guard Mario Chalmers missed his first start of the season with a sprained left hand.

Copyright 2012 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.

For more information about reprints & permissions, visit our FAQ's. To report corrections and clarifications, contact Standards Editor Brent Jones. For publication consideration in the newspaper, send comments to letters@usatoday.com. Include name, phone number, city and state for verification. To view our corrections, go to corrections.usatoday.com.

Posted | Updated

USA TODAY is now using Facebook Comments on our stories and blog posts to provide an enhanced user experience. To post a comment, log into Facebook and then "Add" your comment. To report spam or abuse, click the "X" in the upper right corner of the comment box. To find out more, read the FAQ and Conversation Guidelines.