The Kings have won back-to-back road games after winning just three of their first 25 away from home. Andres Nocioni added 13 for Sacramento, while Tyreke Evans scored seven of his 13 in the final five minutes.
Tayshaun Prince led the Pistons with 23, while Rodney Stuckey finished with 17. Detroit has lost five of six at home, with the only win coming over hapless New Jersey.
The Pistons took a 56-55 halftime lead on Stuckey's layup at the buzzer. Udrih had 18 points in 16 first-half minutes, while Stuckey had 13 points and six assists for Detroit.
Sacramento scored in the final second in the third quarter as Spencer Hawes' put-back dunk pulled the Kings within 79-78.
Back-to-back layups by Evans gave Sacramento a 91-85 lead with 4:30 left. Jonas Jerebko's three-point play cut into the margin, but Evans' dunk clinched it with 30 seconds left.
NOTES: Jerebko and Omri Casspi both started, marking the first Swede vs. Israeli matchup in NBA history. The pair will play together on the rookie team in Friday's rookie-sophomore game. Casspi was greeted by a group of fans waving Israeli flags. ... The Kings lost a point midway through the third quarter when Martin's 3-pointer three minutes earlier was reviewed and ruled a 2-point shot. There was another lengthy review at the end of the quarter before Hawes' dunk was ruled good.