NEW YORK — The Orlando Magic may have found their teachable moment Wednesday night.

After a first half in which the New York Knicks' Chauncey Billups, Toney Douglas and Roger Mason Jr. drained 3-pointer after 3-pointer, the Magic returned to the visitors' locker room inside Madison Square Garden and received a not-so-gentle reminder from their coach.

Stan Van Gundy pointed to a dry-erase board that listed what the team wanted to accomplish on defense. Then he asked his players if they had achieved those goals. Nobody answered "yes."

The Magic ramped up their defense and rode an MVP-caliber offensive performance from center Dwight Howard to recover from an eight-point deficit and beat the slumping Knicks 111-99 at Madison Square Garden.

"Stan just came in the locker room and got on us about our effort," Howard said.

Orlando limited New York to 40 points and 31.8 percent shooting in the second half, prompting what remained of the sellout crowd to boo the Knicks as the final minute ticked off the clock.

"We didn't give up a ton of easy shots," Van Gundy said. "That was the key to the game."

Superb effort on defense likely will be the key to their rapidly approaching postseason.

The Magic have won four consecutive games largely because of their defense.

In this stretch, they limited the Milwaukee Bucks to 42.2 percent shooting, the Denver Nuggets to 35.9 percent, the Cleveland Cavaliers to 39.5 percent and now the Knicks to 40.5 percent.

On Wednesday, no New York player encountered more difficulties than power forward Amar'e Stoudemire. Guarded primarily by Brandon Bass, he connected on just six of his 20 shot attempts and scored 13 points.

"You can't really stop Stoudemire," Bass said. "The guy drives both ways. He can shoot. He's explosive. He's athletic. You basically just have got to play the hardest you can."

With 10 games remaining in Orlando's regular season, it seems all but certain that the Magic have wrapped up the fourth seed in the Eastern Conference. The Magic trail the third-place Miami Heat by 3½ games and lead the fifth-place Atlanta Hawks by six games.

And now the Magic (46-26) expect to look different in the days and weeks ahead.

Players, at the urging of reserve small forward Quentin Richardson, have decided to not to shave their faces until the playoffs end.

Pointing to some scruff on his face, Richardson said, "It's one of those team things. Togetherness and something fun at the same time. It's going to definitely to look funny."

Players inside the New York locker room predictably sounded less cheerful. The Knicks (35-36) have lost all of the momentum they had gained from the trade for Carmelo Anthony and Chauncey Billups last month. The team now has lost four games in a row and seven of its last eight.

"I really can't put a finger on it and what's going on," said Anthony, who finished with a team-high 24 points.

"In the fourth quarter when we get down we panic a little bit, but that just comes from not being aware of one another out there on the court and not being used to each other in the fourth quarter down the stretch. That is going to come. I am not worried about it."

As the Knicks fell apart late, the Magic started to roll. Howard scored 19 of his 33 points in the second half. He finished with 11 rebounds and three blocks.

Orlando's other starters each scored in double figures, led by point guard Jameer Nelson, who had 19 points.

Hedo Turkoglu continued to play energetically, diving to the floor to corral a loose ball on one sequence. He poured in 16 points, collected 11 rebounds and dished out four assists.

The game turned early in the fourth quarter.

Leading 79-78 early in the period, the Magic took an 86-82 lead on a layup by Jason Richardson, two made free throws by Gilbert Arenas and a trey by Richardson.

The Magic were just getting warmed up.

After Stoudemire missed a midrange jumper as he was defended by Howard, Arenas hit a 17-foot shot.

On the Knicks' ensuing possession, Stoudemire missed another jumper, and Arenas immediately countered with a pull-up jumper of his own.

"I thought that Gil gave us a huge lift in that stretch of the game," Van Gundy said. "That's really where we got the lead. I thought he did a very, very good job right there in a key part of the game."

Meanwhile, New York's guards fared far worse.

In the second half, Billups scored only two points and didn't record an assist. Douglas and Mason combined for nine points.

"I think we went at them and we took away a lot of their 3s," Jason Richardson said. "We did a lot of great things in the second half."