SACRAMENTO, Calif. (AP) — Harrison Barnes scored on an offensive rebound with 2.9 seconds remaining after Nemanja Bjelica's missed 3-pointer, and Sacramento won its first game of the season, snapping a five-game skid.

Donovan Mitchell's desperation 3-pointer at the buzzer grazed the front of the rim.

De'Aaron Fox scored 25 points, Buddy Hield had 18 and Bogdan Bogdanovic added 14 to help the Kings (1-5) end their worst start in nearly 30 years. Sacramento entered the game as the only winless team in the NBA.

Mitchell had 24 points for the Jazz (4-2). Rudy Gobert added 15 points and 16 rebounds, and Mike Conley scored 19.