AUBURN HILLS, Mich. (AP) -- Matt Barnes tossed in a desperation 3-pointer from just inside midcourt with 1.1 seconds left to give the Memphis Grizzles a 93-92 victory over the Detroit Pistons on Wednesday night.
Marcus Morris missed a contested shot with 7 seconds left that could have clinched the game for Detroit, and Andre Drummond's tip bounced off the rim.
The Grizzlies grabbed the ball and fired an outlet pass to Barnes. He let go a running, two-handed shot as he crossed halfcourt that went in, silencing the Palace crowd as players on the Memphis bench celebrated.
Morris missed another tough shot at the buzzer, and the Pistons lost their second straight following a four-game winning streak.
Zach Randolph led Memphis with 21 points and 16 rebounds, while Marc Gasol had 19 points and 12 rebounds. Courtney Lee came off the bench to score 14.
Drummond had 18 points and 19 rebounds for the Pistons. Reggie Jackson added 18 points and seven assists.
The Pistons led for almost the entire second half, and Randolph missed a pair of free throws that could have tied the game with 3:43 to play. Jackson's 3-pointer made it 92-87, but Randolph made it a three-point game with a tip-in.
The Pistons were then called for a shot-clock violation with 1:12 to play, and after the teams traded misses, Gasol made it 92-90 from the line, setting up the frantic final seconds.
Detroit only trailed for the final 1.1 seconds of the second half, but hadn't played well early.
The Pistons struggled to hit shots early, trailing by as many as nine points, but rallied to take the lead late in the second quarter. Detroit outscored Memphis 30-19 in the period and led 47-43 at halftime.
Much of the half was a battle between Gasol and Drummond. Drummond finished the half with seven points and nine rebounds, while Gasol had eight points and seven rebounds.
The Pistons expanded the lead to 58-49 early in the third, but the Grizzlies were within 74-67 by quarter's end, and narrowed the gap to one early in the fourth.
Grizzlies: Gasol played despite spraining his left ankle in Tuesday's lopsided loss to Oklahoma City. ... Randolph, who helped Michigan State to the 2001 Final Four, received his usual warm ovation from the Palace crowd. Grizzlies assistant coach Shawn Respert also played at Michigan State, and is still the school's leading scorer.
Pistons: Jackson appeared to injure his leg on the last play of the first half and limped slowly back to the locker room. He came out for the second half with a brace on his right knee, but took the floor at the beginning of the third quarter.
Grizzlies: Host Charlotte on Friday.
Pistons: At Philadelphia on Friday.