Tracy McGrady is just beginning to grow into his talents.

From the Golden State Warriors' perspective, McGrady did far too much growing in one night.

The 22-year-old guard reached 40 points for the third time in six days as the Orlando Magic ended a three-game losing streak with a 105-100 win against the Warriors on Thursday night.

McGrady went 19 of 30 from the field and added seven rebounds. Scoring from inside and outside against a succession of Golden State defenders, he reached 40 points on a two-handed dunk with 48 seconds left for a 12-point lead.

"McGrady is smooth," Warriors coach Dave Cowens said. "He makes it look almost effortless. He's got great hands and a nice touch. We tried a couple of people on him, but he was the guy who really hurt us."

Orlando realizes its future is tied to McGrady, particularly with Grant Hill still out of the lineup because of a foot injury. Earlier in the day, Orlando signed general manager John Gabriel, who got McGrady as a free agent two seasons ago, to a contract extension through the 2005 season.

The Magic have been relying heavily on McGrady, who scored 40 points against Atlanta last Friday and 47 against the Clippers on Monday, but coach Doc Rivers would prefer a more balanced team performance.

The rest of the NBA's highest-scoring team helped against the Warriors, with four players scoring at least nine points. McGrady made an obvious effort to get his teammates involved, particularly in the first half.

"In the last couple of games that we lost, it was just me on the offensive end, plus we didn't get any defensive stops," McGrady said. "This time, everybody contributed, and we also got stops. We pretty much had control of the whole game, but they fought back."

The Warriors scored four quick baskets to close to 100-96 with 15.9 seconds left, but Horace Grant converted a three-point play to seal Orlando's fourth consecutive win over Golden State.

Patrick Ewing scored 14 points, and Mike Miller had 15 points, eight assists and six rebounds for the Magic, who got their first victory on a six-game road trip. Orlando, tied with two teams with a league-high 14 road games this season, was playing its fifth game in seven days.

"Early in the game, (McGrady) wasn't looking to score," Rivers said. "He was getting everyone else involved. Then, in the second quarter and down the stretch, he took over."

Antawn Jamison scored 21 of his 25 points after a foul-plagued first half for the Warriors, who have lost four in a row and eight of nine to drop into last place in the Pacific Division. Jamison called the Warriors' defense "ridiculous," even though he was one of the defenders who couldn't stay with McGrady.

Larry Hughes had 18 points, eight assists and eight rebounds. Erick Dampier, who also had foul trouble, dominated the Magic's centers with 21 points and 10 rebounds.

"The whistle kept blowing," said Warriors forward Danny Fortson, who had six points and 14 rebounds. "No matter what happened, if somebody would fall or slip on something, the whistle would blow. You can't play like that."