DENVER (AP) — Nikola Jokic scored 34 points, including four free throws in the closing seconds, and the Denver Nuggets held on to beat the Detroit Pistons 117-111.

Jokic also had nine rebounds and eight assists, just missing a fifth straight triple double.

Will Barton had 14 points and Aaron Gordon added 13 points for the Nuggets, who went 4-2 on a six-game homestand. Isaiah Stewart, Cade Cunningham, Cory Joseph and Trey Lyles each scored 18 points for the Pistons, who have lost four of five.