SALT LAKE CITY — Gordon Hayward scored 23 points, including the winning basket with 4.5 seconds left, and the Utah Jazz rallied to beat the Sacramento Kings 104-102 on Friday night.
James Johnson's running jumper at the buzzer bounced harmlessly off the rim as the Jazz (7-6) stayed perfect at home.
Hayward scored 10 in the fourth quarter.
Tyreke Evans led Sacramento (3-9) with 19 points and reserve Marcus Thornton added 18, including 13 in the wild final period.
Marvin Williams added 20 points for Utah. Al Jefferson had 17 and Derrick Favors contributed 16 points, 14 rebounds and a pair of blocked shots.
The Kings led 92-79 with 8 1/2 minutes left until Hayward, Williams, Jamaal Tinsley and Jefferson fueled the comeback.
Jefferson's putback gave Utah a 102-99 lead but Thornton tied it with a 3-pointer. Tinsley's late steal set up Hayward for the winner.
Sacramento led by 13 with 10 minutes to play. Thornton made a 3 then converted a three-point play during one key stretch for the Kings. And they were still up 12 after Thornton's short jumper with 6:30 remaining.
Reserve DeMarre Carroll scored on a fast-break layup for Utah, which continued its comeback at the free-throw line. The Jazz made 29 of 33 foul shots for the night, compared to 12 of 16 for the Kings.
Hayward's free throws got Utah within five with four minutes to play, and Williams' long jumper cut the Kings' lead to 97-94. He made two more free throws to get Utah within one.
Tinsley, playing for injured point guard Mo Williams, put Utah ahead with two more free throws with 2:11 left and the Kings came up empty on consecutive possessions.
Jefferson's free throws after being fouled going for an offensive rebound gave Utah a 102-99 advantage with 58 seconds left.
After Thornton's 3, Tinsley missed at the other end with 32 seconds left but he stole the ball back from Aaron Brooks with 15 seconds remaining, giving the Jazz a chance to win it.
Hayward drained it from the top of the key. He was 7 for 17 from the field, but made all nine of his foul shots.
The rally spoiled another homecoming for former Brigham Young star Jimmer Fredette, who was making his third professional visit to Utah. Fredette hit three 3-pointers and finished with 10 points.
DeMarcus Cousins started slowly and finished with 14 points for the Kings, who were hoping to make it two straight after beating the Lakers on Wednesday.
But they couldn't deal with Utah's pressure defense at the end or the disparity at the line.
NOTES: The teams turn around and play Saturday in Sacramento. ... Utah PG Earl Watson was active for the first time since tearing cartilage in his right knee April 8, then undergoing season-ending surgery later that month. He finished with two assists and two rebounds.