The 76ers and the Orlando Magic have been squaring off since the latter joined the league in 1989. For the most part, those contests have ended with an Orlando victory.

Tuesday night was different.

The Sixers defeated the Magic, 126-125, in double overtime at the Wells Fargo Center.

Rookie point guard Michael Carter-Williams had a lot to do with the rare victory for the Sixers (7-12).

The 6-foot-6, 185-pounder, who was playing with a sore right knee, finished with 27 points, 12 rebounds and 10 assists to post his first career triple-double on the night he was named the Eastern Conference rookie of the month. He also took over shortly after Evan Turner fouled out in the second overtime.

"We needed somebody to make some big plays," Carter-Williams said, "whether it was for me to find my teammates or try to get to the hoop and make something happen."

Carter-Williams' effort became a part of NBA history.

Orlando guard Victor Oladipo finished with 26 points, 10 rebounds and 10 assists, making it the first time that two rookies recorded triple-doubles in the same NBA game.

"Clearly, there's a competitive side to it," Carter-Williams said of the rookie duel. "But this is a team game. It's not me versus Oladipo. It's Sixers versus Orlando."

Carter-Williams made a foul shot 41 seconds into the second overtime to give the Sixers a 119-118 lead they never relinquished.

James Anderson scored on an assist from Carter-Williams to stretch the lead to 121-118 with 3 minutes, 46 seconds left. Then Carter-Williams' layup with 2:32 remaining gave the Sixers a three-point cushion at 123-120.

Carter-Williams also assisted on Thaddeus Young's running jumper that made it a 125-120 game with 1:01 left.

Anderson made a foul shot with 1.2 seconds left to give the Sixers a four-point cushion. Orlando guard Arron Afflalo made a three-pointer at the buzzer.

The Sixers snapped a four-game losing streak. It was just their fourth victory in 16 games since they won the first three games of the season.

They earned a rare win against the Magic (6-12). Orlando had won three straight and 24 of the last 30 meetings with the Sixers. The Magic have a 65-30 advantage in the series.

The Sixers had a balanced attack, with six double-figure scorers.

Young added 25 points and 12 rebounds. Turner had 24 points before fouling out early in the second overtime. Anderson finished with 19 points in his second straight game in a reserve role. Spencer Hawes added 17 points and seven rebounds. Hollis Thompson had 10 points.