From Comcast SportsNetMIAMI (AP) -- The NBA plans to make San Antonio pay for resting four starters.The Miami Heat almost could not.Ray Allen's 3-pointer with 22.6 seconds left gave Miami the lead, LeBron James finished with 23 points and the Heat rallied late to beat the Spurs 105-100 on Thursday night -- digging deep despite San Antonio's decision to have four top players resting at home in a move that bothered NBA Commissioner David Stern.The Spurs played without Tim Duncan, Tony Parker, Manu Ginobili and Danny Green, all sent back to San Antonio by coach Gregg Popovich, who said the move was in his team's best interest. Stern disagreed, calling the decision "unacceptable," apologizing to fans and saying that sanctions against the Spurs will be forthcoming.After the game, Popovich said he was unaware of Stern's statement and declined comment about what it might mean."Oh, it would have been great if we won," Spurs forward Matt Bonner said after hearing about Stern's statement. "It goes back to what I was saying, I'm sure everybody else was saying before the game. We have faith in everybody on our roster. We think we have one of the deepest teams in the league."The Heat weren't disagreeing afterward."We survived," Chris Bosh said. "And we won. They have a bunch of talented guys over there. I know that nobody's going to really give them credit, but they are a tough bunch."How tough? Try this -- the Spurs led by seven with 4:48 left, and the margin was still 98-93 when Gary Neal made a 3-pointer with 2:14 remaining.From there, Miami closed on a 12-2 run.But all anyone will likely remember from this one is Popovich's decision -- and whatever Stern does as a result."I apologize to all NBA fans," Stern said. "This was an unacceptable decision by the San Antonio Spurs and substantial sanctions will be forthcoming."Allen scored 20 points, Dwyane Wade added 19 and Chris Bosh finished with 18 points and 12 rebounds for Miami, now 7-0 at home.Neal had 20 points for the Spurs. Tiago Splitter scored 18 points, Nando De Colo added 15, Boris Diaw scored 12 and Bonner had 10 for San Antonio, which finished a six-games-in-nine-nights road trip with a 5-1 record. Bonner also had 10 rebounds, one more than he had grabbed all season entering the game."Pop is the coach of the San Antonio Spurs," Neal said. "He did what's best for us."Stern's statement was released roughly the same time as tip-off in Miami for the nationally televised game.The Spurs' five starters came into the game averaging a combined 23.6 points, or 1.6 points less than James averaged entering Thursday night.And when the Heat ran out to a 16-6 lead, it seemed as though a blowout was in the offing. After all, even the oddsmakers in Las Vegas expected it to be that way -- the Heat were favored by six points in most sports books before the news broke that the Spurs' regulars were resting, after which the line swelled to 13.Apparently, no one told the Spurs that the second-string was supposed to play second-fiddle.San Antonio closed the first quarter on a 21-6 run, taking a 27-22 lead after the period, and simply did not go away. The Spurs led by as many as seven at one point, and after James Anderson made a pair of free throws with 0.6 seconds left in the third, San Antonio held a 76-73 lead heading into the final 12 minutes.But once again, James-to-Allen proved magical for Miami.With the Heat down by one, James nearly lost the ball in the lane, collected himself and kicked it out to Allen, who connected from the left wing to put Miami ahead to stay. James also set up Allen for a final-moment four-point play to lift Miami over Denver earlier this season, along with another late 3-pointer that helped the Heat edge Cleveland last weekend."Every time a guy turns his head I have to find the open spot so LeBron can see me," Allen said. "Anything can happen out there. We put ourselves in such a tough situation, but we kept plugging away."Thing is, no one ever thought it would come down to that.Before the game, Popovich said he decided to sit his core when he saw how challenging this particular part of the schedule was for his team."Everybody has to make decisions about their schedule, about players playing and back-to-backs and trips and that sort of thing," Popovich said before the game. "In our case, this month we've had 11 away games, after tonight. We've had an eight-day trip and a 10-day trip, and we're ending it with four (games) in five nights here. I think it'd be unwise to be playing our guys in that kind of a situation, given their history."It's not unlike other moves Popovich has made before; in fact, not only did he give Duncan, Parker and Ginobili time off together toward the end of last season, which was condensed by a lockout, he actually flew home to San Antonio with them and took a two-game, pre-playoff sabbatical.Popovich said he's gotten letters in the past from fans upset about similar moves, adding that he understands their point and asking that they understand his: He thinks rest is necessary for a roster like San Antonio's. And this decision, Popovich said, wasn't about the fact that the Spurs were facing Miami -- it was more about a home matchup with surging Memphis on Saturday."Perhaps it'll give us an opportunity to stay on the court with Memphis on Saturday night," Popovich said. "Historically, when you're on a long road trip, that first game when you come home is really tough. And Memphis is one of the best teams in the league. They're of much more concern to us than playing four games in five nights. It's pretty logical."Given Stern's statement, it's also logical to think that the Spurs could know their penalty by Saturday as well.Heat coach Erik Spoelstra said Popovich's move didn't affect Miami's preparation."Each organization has a big-picture view of what they are trying to get accomplished and I think the league respects that," Spoelstra said.In this case, maybe not.NOTES:Miami last played on Saturday, at home; San Antonio had played on Sunday, Monday and Wednesday, all on the road. ... A moment of silence was held before the game for Sasha McHale, the daughter of Houston coach Kevin McHale. Sasha McHale died Saturday at age 23. ... It was the third straight home game in which Miami trailed in the fourth quarter. ... The back-and-forth game ended a run of blowouts in the Heat-Spurs series. The previous five meetings were decided by an average of 24.8 points, including three 30-point games -- two of those Spurs wins in San Antonio, the other a Heat win in Miami.