DETROIT (AP) De'Aaron Fox scored 27 points and the Sacramento Kings snapped a nine-game losing streak with a 110-107 victory over the Detroit Pistons on Friday night.

Sacramento blew a 17-point first-quarter lead, then rallied from an eight-point deficit in the final quarter. The Kings held on after Detroit missed two late free throws intentionally - earlier than the Pistons probably needed to employ that desperate strategy.

The Kings were up 106-104 when Harrison Barnes missed from the perimeter. Buddy Hield swooped in for a tip-in for Sacramento with 12.9 seconds left, but the play was challenged by Detroit and the call was reversed. A foul was called on Hield, and Josh Jackson went to the line at the other end with a chance to tie it.

Jackson missed the first free throw, then missed the second on purpose. Nemanja Bjelica rebounded for the Kings and was fouled, and he made one of two free throws to push the lead to three.

Sacramento fouled Jerami Grant immediately, and he made both free throws. Then Bjelica got free for a layup to make it 109-106, and the Kings again fouled with a three-point lead, putting Dennis Smith Jr. on the line with 8.1 seconds left.

Smith made the first free throw, but his intentional miss on the second didn't hit the rim. The ball went over to Sacramento.

''That was miscommunication on all of us,'' Pistons coach Dwane Casey said of the intentional misses. ''It wasn't good communication, period. Learning experience, to learn from that, closing games.''

Barnes was fouled with 7.4 seconds left, but he only made one of two free throws, giving the Pistons one more chance down three. Grant's contested 3-pointer missed everything, though.

''It was a good way to end a really tough trip for our guys,'' said Kings coach Luke Walton, whose team was playing the last of five straight games on the road. ''That should hopefully make the flight a little easier, but with the understanding that we have to build on this.''

Sacramento led 31-14 late in the first quarter before Detroit began gradually working its way back into the game.

''Just wanted to come out there, try to set the tone as early as possible,'' said Richaun Holmes, who finished with 19 points and 17 rebounds for the Kings. ''Thankfully we were able to snap the losing streak.''

Grant led all scorers with 30 points.

TIP-INS

Kings: Sacramento is 2-5 in the second game of back-to-backs. ... G Tyrese Haliburton (left calf soreness) was out for the Kings. Sacramento was also without C Hassan Whiteside and F Jabari Parker because of health and safety protocols.

Pistons: G Delon Wright (right adductor strain) missed the game.

LATE LIFT

Bjelica played only 6 seconds through the first three quarters but scored eight points in the fourth. He boosted a Sacramento bench contingent that was outscored 34-10. The remaining Kings reserves shot 1 of 15 from the field.

UP NEXT

Kings: Host the Charlotte Hornets on Sunday night. The Kings went 0-2 against the Hornets last season.

Pistons: Host the New York Knicks on Sunday night. Detroit traded guard Derrick Rose to New York earlier this month and received Smith in return.

---

Follow Noah Trister at https://twitter.com/noahtrister

---

More AP NBA: https://apnews.com/NBA and https://twitter.com/AP-Sports

Copyright 2021 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.