OAKLAND, Calif. -- Klay Thompson buried a 3-pointer from the right wing with 7.5 seconds remaining, rallying the Golden State Warriors to an 87-83 victory over the Sacramento Kings on Wednesday night.
The Kings were primed to win a third consecutive game over their Northern California rivals after newcomer Patrick Patterson's 3-pointer at the 1:25 mark gave Sacramento its first lead of the final period, 83-82.
Neither team scored in its next two possessions, and when Andrew Bogut rebounded Toney Douglas' miss the Warriors had one final shot at erasing the one-point deficit.
David Lee found Thompson open on the right wing, and the second-year guard fired over a lunging John Salmons for his first game-winning shot in the NBA.
After a timeout, the Kings (21-42) went to Tyreke Evans, but his running 8-footer over Thompson was off the mark.
Draymond Green, fouled after securing the rebound, iced the win with two free throws with .2 second left.
The Warriors (35-27), who lost twice at Sacramento earlier in the season, were able to improve to 2-0 on their seven-game homestand despite shooting just 36 percent Wednesday and getting just a 3-for-11 shooting night from standout guard Stephen Curry.
Thompson led the Warriors with 20 points, hitting 4 of 10 3-point attempts. Lee chipped in his nightly double-double, with 17 points and 10 rebounds.
Jason Thompson, whose 16-footer set up Patterson's 3 and got the Kings within 82-80 with 1:55 to go, paced Sacramento with 17 points. Patterson added 15.
The Warriors had held the lead for 15 minutes thanks to a 9-0 run late in the third quarter that was highlighted by a key sequence from an unusual source.
After Klay Thompson's 3-pointer had helped the Warriors break a tie and go up 62-56, the Kings went inside to big man DeMarcus Cousins, who was rejected at the rim by Golden State backup center Festus Ezeli.
The Warriors' rookie then found the ball in his hands under the Golden State hoop about 20 seconds later, with Cousins primed to get his revenge. But Ezeli shielded a left-handed layup with his body, getting the hoop and a foul on the Sacramento big guy.
Ezeli completed a three-point play with the free throw, giving Golden State its biggest lead of the second half at 65-56.
Marcus Thornton and Evans scored the first two hoops of the fourth quarter, however, getting Sacramento to within 69-67, and the Warriors' biggest lead after that was just seven points.
The Kings overcame an early offensive push by Golden State to take a 44-41 lead into halftime.
Golden State made seven consecutive shots, including three 3s, over a 3:17 stretch early in the game en route to a 10-point lead. It might have been more if not for seven first-quarter turnovers, which produced 17 points.
The Kings buckled down on defense the rest of the half, limiting the Warriors to 24 points over the final 18:05 en route to their halftime lead. Golden State made just 9 of 33 shots during that time.
Meanwhile, Douglas came off the bench to score seven second-quarter points and fellow reserve Patterson had five points and six rebounds, leading a Sacramento backup crew that outscored its Golden State counterparts 21-9 in the half.
The Warriors' Lee led all scorers at that point with 13.
NOTES: The Kings had 94-92 and 131-127 home wins over the Warriors in November and December. ... Kings coach Keith Smart was the Warriors' second-round pick (No. 41 overall) in 1988. He never played a game for the Warriors, due in large part to the fact that the team's top pick that year, Mitch Richmond, played the same position. ... In a rivalry dating back to 1948, the Kings and Warriors each had 184 wins entering Wednesday. ... The Kings and Warriors, who have never met in the playoffs, have been together in the Pacific Division since 1988, but that could change if the NBA approves the Kings' sale and move to Seattle. It's possible a Seattle team would be placed in the same division as its new rival, Portland, which currently resides in the Northwest Division. ... When asked before the game whether he were "interested" in the Kings' sale saga, Warriors coach Mark Jackson said no. ... The Warriors began the day in the No. 6 playoff position in the Western Conference. "We're in a good place right now," Jackson assured. "I feel real good about where we're headed." ... The Warriors will return to their sleeved yellow jerseys Friday night when they host the Rockets. ... The Warriors announced Tuesday they will play two preseason games against the Lakers in China next season -- Oct. 15 in Beijing and Oct. 18 in Shanghai.