De'Aaron Fox scored 27 points to lead the Sacramento Kings to a 110-107 win Friday over the host Detroit Pistons to end a 9-game losing streak.
Harrison Barnes scored 21 points, and Marvin Bagley III and Richaun Holmes each added for Sacramento. Holmes also grabbed a season-high 17 rebounds.
Jerami Grant scored a game-high 30 points, and Saddiq Bey and Dennis Smith Jr. each added 17 points for the Pistons, who have lost five of six.
With the game tied at 101, a dunk by Barnes gave the Kings the lead with 1:08 remaining.
After a free throw by Grant, Barnes then hit a 3-pointer with 41.4 seconds left that put Sacramento up 106-102.
Detroit cut its deficit to 106-104 with 37.4 seconds left on a dunk by Josh Jackson, but Sacramento took a 107-104 lead with 11.3 seconds remaining on a free throw by Nemanja Bjelica.
On the ensuing inbounds, Sacramento elected to foul Grant, who made two free throws with 10.6 seconds left to make it 107-106.
Sacramento took a 109-106 lead with 9.2 seconds left on a layup by Bjelica, and then the Kings again elected to foul, putting Smith on the foul line with 8.1 seconds left.
Smith made the first and intentionally missed the second, but Sacramento got the rebound.
Barnes then split a pair of free throws 7.4 seconds left to give Sacramento a 110-107 lead.
On the next possession, Sacramento decided not to foul Detroit, which saw a game-tying 3-point attempt by Grant miss the rim and go out of bounds with 1.4 seconds remaining.
The Kings then ran out the clock.
Trailing 89-81 with 9:07 remaining in the game, Sacramento went on a 10-2 run to tie the game at 91 with 6:08 left.
Sacramento held a 69-62 lead with 6:13 left in the third quarter before Detroit responded with an 11-2 run to take a 73-71 lead with 4:08 left in the third.