AUBURN HILLS, Mich. -- The Miami Heat knew that Richard Hamilton's return would help the Detroit Pistons' offense.
They weren't expecting him to boost Detroit's defense as well, leading the Pistons to a 94-88 victory over the Heat on Sunday.
"Rip Hamilton basically turned the game around with his pressure and his defense," Miami coach Pat Riley said. "That got them aggressive."
Hamilton, who had missed four games with a concussion and the flu, scored 17 of his 19 points in the second half and limited Miami's Jason Williams to eight points after he had scored 13 in the first half.
"I've been watching Lindsey Hunter play defense all this time, and I'm learning from him," Hamilton said. "Jason Williams was getting whatever he wanted in the first half, and I wanted to take that away from him."
Hamilton played 20 second-half minutes, hitting five of seven shots and going 7-for-7 from the free-throw line.
"In the first half, (Coach) was being cautious, because he didn't know what I had, but I told him that I wouldn't be out there if I wasn't ready," he said. "After seven days of headaches and dizziness, it was just good to be moving around again."
The win clinched the season series for Detroit, 2-1.
"This is a very disappointing loss for us," Riley said. "We needed it."
Hamilton's jumper broke an 85-all tie with 1:51 to play, but Dale Davis fouled Shaquille O'Neal at the other end.
O'Neal, a 44 percent free-throw shooter this season, split the pair, making it 87-86. The missed free throw was Miami's seventh of the quarter and 15th of the game.
"It was a lot of things," Riley said. "We gave them easy baskets, we gave them second chances, and we started missing free throws."
Chauncey Billups then hit a jumper over Williams to give the Pistons a three-point edge with 1:15 to go.
James Posey missed a 3-pointer, and Rasheed Wallace's short jumper gave Detroit a five-point lead.
Eddie Jones cut the deficit to 91-88, but the Pistons clinched the game from the line.
"There's always an extra buzz when you beat the champs," Billups said. "But it only counts as one win."
Detroit's bench outscored Miami's 34-11.
"Our bench was great -- not just from a scoring standpoint, but their energy," Detroit coach Flip Saunders said. "They gave the starters a chance to get some significant rest, and then win the game in the last four minutes."
O'Neal led the Heat with 23 points, but didn't have a field goal in the final 13:55.
"We had this, but against a good, poised team like Detroit, you have to limit your mistakes," O'Neal said. "We had some costly turnovers in the fourth quarter."
The teams traded big first-half runs. Miami jumped ahead with a 22-6 burst in the first, but the Pistons answered with a 16-2 surge that gave them a 28-26 lead midway through the second.
The Heat were ahead 46-41 at the half, led by 13 points each from O'Neal and Williams.
Hamilton kept Detroit in the game, scoring 11 third-quarter points, but O'Neal's inside presence had Miami ahead 69-65 entering the fourth.
Antoine Walker started the fourth with a 3-pointer, and Alonzo Mourning's dunk made it a nine-point game just 96 seconds into the quarter.
Detroit was called for the first five fouls of the fourth, but Miami couldn't take advantage. Even with O'Neal on the bench, the Heat missed six of their first eight free throw attempts of the period.
That let the Pistons rally, and Carlos Delfino's steal and dunk pulled them to 78-77 with 6:50 left. The Heat missed on their next two possessions, and a dunk from Antonio McDyess and Flip Murray's long jumper gave the Pistons a three-point lead.
The Heat called a timeout, but Williams was called for a foul on the ensuing inbounds pass, and McDyess banked in a jumper to make it 83-78.
McDyess, though, fouled O'Neal seconds later, and was called for a technical after slamming the scorer's table. Williams and O'Neal made all three free throws, cutting the Pistons margin to two.
The Pistons only had one assist in the first quarter, but dished out six in the second, including four by Murray. ... Posey received a technical for shoving Hamilton in the fourth quarter. ... O'Neal said after the game that he expects Florida to fall short in Monday night's NCAA championship game. "I'm going with Ohio State and big Greg Oden." ... At one point in the fourth quarter, the crowd was so loud that Davis was called for a foul on Posey, but play continued for several seconds because many of the players didn't hear the whistle.