MIAMI (AP) -- Shaquille O'Neal helped the Miami Heat build a 22-point lead. And when they blew it, he delivered the go-ahead dunk in the final minute to beat the Detroit Pistons.
O'Neal had 31 points and 15 rebounds, both season highs, and the Heat earned their most impressive win yet since losing Dwyane Wade, edging Detroit 85-82 Friday night.
"Dwyane was our first option because of the things he could do, but he's not here now," O'Neal said. "So now it's back to me being the first option."
The Pistons rallied from a 50-28 deficit to take their first lead with 3:14 left. But O'Neal's dunk with 36 seconds to go put the Heat ahead to stay, 82-80.
Detroit missed three 3-point tries in the final 20 seconds that would have tied the game, including one by Chauncey Billups, who finished 2-for-14 from the field. He missed 11 consecutive shots before scoring his first basket with 5 minutes left.
Antoine Walker scored 22 points for Miami. Tayshaun Prince had 22 and Richard Hamilton 20 for the Pistons, who failed to overcome a season-low 31 points in the first half.
"We never had any energy at all in the first half," Prince said.
The Heat improved to 3-2 since Wade was sidelined with a dislocated left shoulder. Detroit's Rasheed Wallace missed the game because a sprained left foot.
By taking the rematch of last year's Eastern Conference finals, the Heat extended their season-high home winning streak to eight games, while ending Detroit's four-game winning streak.
O'Neal shot 12-for-16, went 7-for-14 at the line and had six assists.
"If he gets the ball enough, he's going to score," Billups said. "There's still nobody who can guard him. You have to send two or three guys after him."
When the Pistons tried to defend O'Neal one-on-one, he used spin moves to get to the rim.
"I take it personal when people don't double me," he said. "It's against my religion not to double me. It upsets me. It makes me think they're saying to themselves I don't have it anymore."
The Pistons shot only 38 percent, but they tied the game at 80 with 56 seconds left when Antonio McDyess made two free throws. Walker then drove the lane, and when his left-handed hook missed, O'Neal was there with the dunk follow.
After Jason Williams made one of two free throws for Miami, Chris Webber threw up an airball on a 3-point try that would have tied the game. The Pistons had one more chance when Prince intercepted an inbounds pass with 8 seconds left, but they missed two desperation 3-point tries.
"It would have been a nightmare," Heat coach Pat Riley said. "But it didn't happen. Any time you keep a team in the 80s, you have a chance to win, even though we didn't play well in the second half."
Playing for the first time since Sunday, the Pistons looked sluggish in the first half, which allowed O'Neal to dominate. During one stretch of 10 possessions over 5 1/2 minutes, he had a hand in eight scores, helping the Heat take a 50-28 lead.
The sequence started with three quick baskets by O'Neal, two on dunks following spin moves. Then he slipped an interior pass to Antoine Walker for a dunk that produced a three-point play.
Next, O'Neal grabbed an offensive rebound and threw a no-look bounce pass to Gary Payton breaking to the basket for a layup. Then O'Neal banked in a hook shot. On the next possession he earned another assist, hitting Walker for a 3-pointer to cap a 15-3 spurt.
O'Neal ran the court twice early, thundering up the middle on fast breaks, and both times the Heat scored. He was force on defense, too. The first time Webber challenged him inside, the shot was blocked, starting a fast break that ended with a layup by Eddie Jones.
"It's hard to keep a lead against a team like that, especially if you make as many mistakes as we did," O'Neal said. "But we stuck in there and beat a good Detroit team."