SACRAMENTO, Calif. (AP) — Cory Joseph made a 14-foot jumper with 25.9 seconds remaining to cap a game-ending 11-0 run that rallied the Detroit Pistons past the Sacramento Kings 133-131.

Saddiq Bey had 30 points and seven rebounds to help the Pistons win their fourth in seven games.

Kelly Olynyk added a season-high 22 points and nine rebounds in his first game since November.

Joseph, the former Kings guard who was dealt to the Pistons at the trade deadline last year, finished with 19 points and nine assists.

Terence Davis scored 14 of his career-high 35 points in the fourth quarter for the Kings.

De’Aaron Fox added 27 points, eight assists and six rebounds but missed a 14-footer at the buzzer.

Sacramento has dropped seven of nine.