ORLANDO, Fla. (AP) -- It's been an open secret for several seasons how much the 3-point shot has become an indispensable part of the Orlando Magic 's offense.
They reminded the Miami Heat just how punishing they can be when they get it going from long range.
Dwight Howard had 25 points and 24 rebounds, Ryan Anderson scored 27 and the Magic hit 17 3-pointers in a 102-89 victory Wednesday night.
Anderson had five 3s - 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 3s 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 3s, 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.
Miami continues its six-game road trip Friday at Washington.
" 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 out to a 17-point lead in the first half.
That cushion was 16 at the start of the fourth quarter thanks to all those 3s.
The Heat got within 89-80 on a basket by Chris Bosh before Jameer Nelson's 3 from the corner pushed the Magic's advantage back to 12 with 3:53 to play. The Heat never got any closer.
Magic coach Stan Van Gundy said it was a solid first effort against a Southeast Division rival they will face three more times this season.
" 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 3-point line than from the field at one point in the fourth quarter. The Magic finished the night at 42 percent from the floor (35 for 83) and 40 percent (17 for 42) from 3-point range.
Miami shot 47 percent from the field (36 for 76) but had only five 3-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 3-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 3s and 24 points paced the Magic.
Howard had 13 points and 13 rebounds in the opening 24 minutes.
" They shot the 3 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 3s 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 following his trade from Boston 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 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.