The Detroit Pistons suffered one of the worst losses of the Stan Van Gundy era this far on Wednesday night, and they have themselves and Matt Barnes to blame.

Detroit had plenty of chances to seal the game in the waning seconds, including multiple looks at the rim, but could not convert.

Barnes made them pay.

He hauled in a rebound with five seconds remaining in the game, and put up a running floater from half court.

Barnes’ game-winner lifted the Grizzlies to a 93-92 victory over the Pistons.