NEW YORK (AP) Jimmy Butler's new teammates saw him drift to one of his favorite spots on the court and already knew what to expect.

Butler made a 3-pointer with 2.3 seconds remaining to give the Philadelphia 76ers a 127-125 victory over the Brooklyn Nets on Sunday.

''Man, to tell you the truth it could have been anybody,'' the Sixers' recent addition said.

''They do have a lot of confidence in me but I got so much more confidence in those guys. They really got us back in game.''

Butler's shot from the right wing, similar to the one that beat Charlotte in overtime on Nov. 17, capped Philadelphia's rally from 20 points down in a game the Nets led nearly all the way.

Butler finished with 34 points and 12 rebounds, and Joel Embiid had 32 points and 12 boards for the 76ers, who have won five of their last six games.

A game-time decision after spraining his ankle against Cleveland on Friday night, Butler looked fine after he spent Saturday at Villanova's home gym.

He hoisted up shots from about 20 different spots, including the same area from where he would go on to make the 76ers a winner.

Embiid has grown accustomed to Butler's flair for the dramatic, but knew his new teammate had to rush it a little after Philadelphia inbounded the ball with just 10.2 seconds remaining.

''He kept taking his time and I am like, `Are you going to freaking shoot the ball?'' Embiid said. ''You know, big-time play. He got to his spot and he made a big-time shot.''

The Nets shot 57 percent from the field and hit 46 percent beyond the 3-point line to head into the half with a 68-54 lead before the 76ers rallied.

D'Angelo Russell had 38 points, his highest total with the Nets, and added eight assists and eight rebounds. Spencer Dinwiddie scored 31 points off the bench for Brooklyn, which is just 3-6 at home.

''It's tough, we played 45 minutes of that game and lost it to that one shot, but we gave ourselves a chance,'' Russell said.

The 76ers, who are a league-best 10-1 at home, improved to just 4-7 away from the Wells Fargo Center.

Butler, whose first game-winner with the Sixers ruined Kemba Walker's 60-point performance in Charlotte, led Philadelphia's fourth-quarter charge after it looked sluggish throughout the first three quarters.

Philadelphia coach Brett Brown was equally impressed with Butler's effort when he recovered a loose ball after JJ Reddick had missed a potential go-ahead basket.

Brown recalled how Butler made a similar play against the Hornets when he blocked a shot and saved the ball from going out of bounds to set up his game-winner.

''The TVs are going to replay his shot,'' Brown said. ''I hope they go a few seconds earlier and see him dive on the floor and secure a jump ball.''

Brooklyn led 118-105 after Dinwiddie's basket with 4:57 left in the fourth quarter.

Philadelphia then went on a 16-2 run and went ahead 121-120 on Redick's 3-pointer with 1:03 remaining, its first lead since Embiid scored the game's first two points.

Joe Harris answered with a 3 of his own to put the Nets back ahead but Embiid came back on the other end, converting a three-point play after Harris fouled him to give Philadelphia a 124-123 lead.

Dinwiddie briefly put Brooklyn back on top with a jumper over Redick, setting the stage for Butler's big shot.

The Nets have lost three straight.

TIP-INS

76ers: Embiid has 18 20-point games this season, second to Kevin Durant's 19. . Philadelphia is 14-8 on the season but 5-2 since acquiring Butler on Nov. 12. . It was Butler's first game in which he tallied at least 20 points and 10 rebounds since Nov. 19, 2017.

Nets: Brooklyn's 14-point lead at the half was its largest of the season. . Russell and Dinwiddie are the first Nets teammates to each score at least 30 points in a game since Brook Lopez and Deron Williams on April 3, 2015. . Brooklyn's bench outscored its counterparts 48-23.

FULTZ FORCE

Brown said he expects Markelle Fultz to proceed with a doctor's appointment Monday to have his right shoulder examined. Fultz has missed his last three games and has not played or practiced since Tuesday when his agent announced that the top pick in the 2017 NBA draft would be seeing a specialist in New York. The 20-year-old is averaging 8.2 points in 19 games this season.

UP NEXT

76ers: Host the New York Knicks on Wednesday.

Nets: Host the Utah Jazz on Wednesday.

Copyright 2018 by AP. Any commercial use or distribution without the express written consent of AP is strictly prohibited.