PHILADELPHIA (AP) -- Perfect home record at stake, a game down to the wire, and the Philadelphia 76ers sure could have used Jimmy Butler in the clutch, just like he was for them so many times last season.
The Heat were glad to have the All-Star on their side -- and Butler did enough to help spoil the Sixers' perfect home record.
Butler and the Heat won their 20th game, and perhaps proved they're more than a one-man show.
''This is a team of one star?'' Butler asked incredulously. ''Who's our star, Bam? I'll take it. I'll take Bam as our star any day. I ain't worried about what anybody says. We're content with who we are.''
The 76ers had been 14-0 at home, including a 113-86 victory over the Heat last month.
They came within a late bucket or two of staying flawless in Philly.
Tobias Harris buried a 3-pointer for the Sixers with 25.5 seconds left that made it 106-104 and they had sudden life when Nunn missed twice at the free throw line. Al Horford, though, missed an open 3-point attempt from the wing and the Heat escaped in a thriller.
Duncan Robinson had 15 for the Heat and hit a pair of 3s in the fourth that stretched the lead to 14 points. Nunn buried a 30-footer for a 99-83 lead that should have been enough of a cushion for Miami.
Joel Embiid, who missed Sunday's rout by the Nets with an upper respiratory illness, had 22 points and 19 rebounds. Harris scored 20 points and the Sixers struggled to get going until late against Miami's 2-3 zone that put them on their heels.
''We weren't making shots and when you're not making shots, especially when a team is playing zone, they're going to keep on doing it,'' Embiid said. ''They did it all game and that's how they won the game.''
Butler scored 14 points for the Heat and was pretty much a non-factor until late in his second game back in Philadelphia.
Butler was soundly booed the first few times he touched the ball and continued to get jeers throughout the game. He played 55 regular-season games for the Sixers last season, averaging 18.2 points after being acquired in a trade with Minnesota last November. He helped Philadelphia beat Brooklyn in the first round of the playoffs before the 76ers were eliminated in the second round by Toronto.
Butler left Philadelphia in the offseason, signing a $142 million, four-year deal with the Heat in a sign-and-trade that brought Josh Richardson to Philadelphia.
Heat coach Erik Spoelstra said Butler has been a perfect fit for a team trying to return to the playoffs after missing them last season.
''I feel like I've coached a lot of guys like Jimmy that are adults, that are very serious about winning, about the process of winning,'' he said. ''Ultra competitive. He's a max player. We wanted a max player, someone that would fit our culture and our system.''
Richardson did his part late, hitting a 3 that made it an eight-point game and one more that made it 101-97 and sent another packed house into a frenzy. With a perfect home start still within reach, the 76ers coughed up the ball to Miami -- and Butler crushed them with an assist on a 3 from Derrick Jones Jr. that gave the Heat needed breathing room.
Butler sank two free throws with 33.9 seconds left, toying with the 76ers to the end.
''I don't think we had a sting to our defense,'' 76ers coach Brett Brown said. ''What did they have, four 3s with a second left? Sometimes it's just not your night. There were times they were hurling up shots at the end of the clock, one of which was a bank shot, you feel like maybe it's going to be a long night.''
Heat: The Heat went on a 27-7 run to close the first half and seemingly put the game away. The Heat stymied with the Sixers with the zone defense that helped them bust the game open. ''It was by any means necessary,'' Spoelstra said. ''We're only playing eight guys. We probably would have gotten into a lot of foul trouble if we just stayed with our man. We still trust it. We'll have to do both, obviously.''
76ers: Butler struck a friendship with Embiid and remained a fan of the All-Star center. ''That dude, he's real,'' Butler said. ''He does everything well. He's a true generational talent.''
HE SAID IT
''Gregg Popovich and Pat Riley.'' Brown on how to build a generational franchise like San Antonio and Miami.
Heat: Host the Knicks on Friday.
76ers: Play back-to-back home games Friday against Dallas and Saturday against Washington.
More AP NBA: https://apnews.com/NBA and https://twitter.com/AP-Sports