It can surely be argued that the Dodgers got the last laugh, having clinched the National League West title before stepping on the field as the D-backs' loss to the Cardinals earlier in the day handed them the division title.
But for Peavy, who is 13-1 in 22 career starts against the Dodgers, this victory was one to savor if for no other reason than what he's been through in the past week, the past six months.
Peavy (10-11) labored through a 53-pitch fifth inning, sticking around just long enough for the victory on a night when he wasn't at his best.
Peavy allowed three runs over five innings in his first appearance in 13 days. He missed his last scheduled start Friday in Washington to fly home to be with his wife, Katie, who gave birth to a son, Judson Lee, that day.
"I hadn't been out there in a while," Peavy said. "I was rusty and I ran out of gas. I knew that I threw a lot [of pitches]. I appreciate Buddy [manager Bud Black] leaving me in there to have a chance to win the game. I was glad I was able to stay in the game."
In a game that saw the Padres (62-97) get home runs from Brian Giles as well as Adrian Gonzalez's 36th home run and four hits from Luis Rodriguez, Peavy burned through more than 50 pitches in the fifth inning.
The Dodgers (83-76) sent nine batters to the plate in the inning, scoring runs on a single, a wild pitch and a bases-loaded walk. The inning was extended when plate umpire Jeff Nelson ruled a ball for a walk on a pitch that appeared down the heart of the plate.
Watching closely from the dugout, Black didn't see a pitcher who was laboring greatly despite the pitch count. It did occur to him how many pitches the defending Cy Young Award winner was throwing, but it wasn't enough to go get him.
"His delivery was still on line, his stuff was still there and he was making pitches," Black said. "He didn't look like he was laboring."
About the only thing laboring was the season for Peavy, who finished with a sub-.500 record despite pitching well. His ERA for the season will stand at 2.85. Whereas runs were often plentiful last season in an 89-win season, they essentially evaporated this season.
"I'm kind of relieved in a way ... on one end I'd like to still be pitching, but I've got a chance to relax and get healthy," he said.
The Padres, who open their last series of the season Friday at PETCO Park against the Pirates, saw their bullpen nicked for two runs over the final four innings of the game, though they seemed to answer each and every Dodgers rally.
The Dodgers cut the Padres lead to 4-3 with that three-run inning but San Diego came back with a run in the sixth inning on Gonzalez's solo home run, which made him the fifth player in franchise history to hit 36 or more home runs in a single season.
"It's not an individual sport ... if I was a tennis player, I'd be happy," Gonzalez said. "I'm not going to be happy when we're close to losing 100 games.
Los Angeles then got a run back in the bottom of the inning before the Padres scored single runs in the eighth and ninth innings before Trevor Hoffman worked a scoreless ninth inning for his 29th save of the season.