PHILADELPHIA -- The Orlando Magic shot poorly in the second half until it mattered.
Prior to Lewis' shot, the Magic were 11-for-34 (32 percent) from the field after halftime.
"I didn't like the way we were playing in the second half," Orlando coach Stan Van Gundy said. "We had big turnovers and missed a ton of open shots at one stretch."
But Van Gundy was smiling at the end, thanks to Lewis.
On the winning play, Lewis inbounded to Hedo Turkoglu, who took several dribbles down the lane before passing to Lewis on the left wing. Lewis drained the shot and the 76ers, without any timeouts left, could manage only Andre Miller's 40-footer at the buzzer that came up short.
"It was going to be a screen for Turk," Lewis said. "My man stayed with me for a while and then the defense kind of collapsed and Turk found me."
Said Van Gundy: "It was a set play to a point. We wanted to get the ball in Lewis' hands and he made a play. I'm not taking credit for that. The credit goes to Turkoglu and Rashard Lewis."
Dwight Howard had 21 points and 14 rebounds for the Magic (11-4), who nearly surrendered a 12-point, first-half lead. Tony Battie had a season-high 20 points and Turkoglu added 12 for Orlando, which won for the seventh time in eight games.
"We just have to learn how to stay stern, stick to the game plan and not leave those shooters," Brand said. "We played well enough to win the game and they hit a big shot."
Turkoglu gave the Magic a 93-92 lead with 35 seconds left with two free throws. Iguodala answered with a pair from the line to give Philadelphia a 94-93 advantage with 14 seconds left, setting up Orlando's final possession.
"That was a tough loss for us, going down the stretch like that," 76ers coach Maurice Cheeks said. "We had made plays up to that point. The way we played tonight was the way we need to play night in and night out."
Marreese Speights hit a 38-footer as time expired to end the third quarter for his first career 3-pointer to give Philadelphia its first lead, 72-71. Speights scored on a fast-break layup to open the fourth period before hitting a 15-footer that gave Philadelphia its largest lead, 80-74, with 8:31 left.
The Sixers held the lead for most of the final quarter, but could never gain a margin larger than six despite several chances to put away the cold-shooting Magic.
"Sometimes you get lucky and we got lucky tonight," Lewis said. "It was most definitely a big win for us."
Orlando shot 20-for-33 (61 percent) in the first half to take a 55-45 lead at the break. But the Magic missed 13 of 19 shots in the third quarter and the 76ers took advantage, outscoring Orlando 27-16 in the period to go up by one.
Brand scored 11 points in the quarter, including nine during an 18-8 Philadelphia run to open the second half that trimmed Orlando's lead to 61-59 with 5:32 left in the quarter. The Magic missed nine of 12 shots during the 76ers' spurt.
Battie, who entered Wednesday averaging only 3.9 points, scored 16 points in the first half by making all seven of his field goals and both of his free-throw attempts.
- Magic guard Jameer Nelson watched from the bench after suffering a strained right hip flexor Monday in a 108-101 victory against Milwaukee. The Chester, Pa., native and Saint Joseph's University product is expected to miss seven to 10 days.
- Iguodala hasn't scored more than 19 points in a game this season after averaging 19.9 last season.
- Howard recorded his 11th double-double of the season.