LOS ANGELES (AP) -- Clayton Kershaw hadn't allowed more than one earned run in any of his previous five starts. So when teammate Adrian Gonzalez hit a two-run homer in the first inning against Shelby Miller, that appeared to be enough for the major league ERA leader to get his third straight victory.
The St. Louis Cardinals had other ideas.
Pete Kozma hit a three-run double in the second inning and Matt Carpenter drove in the go-ahead run with an infield single in the seventh against the Los Angeles Dodgers' ace, sending him to a 5-3 loss on Sunday in the rubber game of the series.
"They found some holes today and got a lot of hits that fell in there. But that's the mark of a good team," Dodgers catcher A.J. Ellis said. "That's a good professional hitting team over there that battles and grinds."
Kershaw (5-3) had not allowed more than three earned runs in any of his previous 22 starts since giving up eight over 5 2-3 innings against the Cardinals on July 24, 2012, at St. Louis. That was the longest such streak by a Dodger since Orel Hershiser's 27-game stretch between July 12, 1985, and May 25, 1986.
"This start is better than going five innings and giving up three," Kershaw said. "Going deeper into the game is obviously important, especially for our bullpen. You're not going to be able to just go out there and throw up zeros or one run every time. You've got to battle sometimes."
Kershaw gave up four runs, seven hits and three walks in seven innings and struck out five as his ERA rose from a major league-best 1.35 to 1.68. The 2010 Cy Young Award winner had allowed only three earned runs in 39 2-3 innings over his previous five outings, including two no-decisions.
"Kershaw's a great pitcher. But he's going to come out and throw strikes, so you need to be ready to swing the bats," Kozma said. "We needed every run we got."
Gonzalez drove a 1-1 pitch into the right field pavilion for his team-high sixth home run, after a leadoff walk to Carl Crawford. But the Cardinals countered with three runs in the third.
Yadier Molina drew a leadoff walk, David Freese hit a broken-bat bloop double down the left field line on the next pitch, and .229-hitting Daniel Descalso walked on four pitches. Kozma then lined a fastball just inside third base and past a diving Juan Uribe for the bases-clearing double.
"He went up there looking for a fastball and he hit it. So you have to give him credit there -- especially after a four-pitch walk," Kershaw said. "That second inning was frustrating, giving up the walks, and that bloop hit was frustrating. You can't do much about the hits, but you can't walk guys. So that was definitely my fault there."
Kozma led off the seventh with a bloop double off the glove of shortstop Dee Gordon as he dived for the ball in short center field. One out later, Carpenter grounded a single off the glove of first baseman Gonzalez, allowing Kozma to score. Pinch-hitter Matt Adams added an RBI single in the ninth.
The Dodgers loaded the bases in the seventh after Trevor Rosenthal followed Maness out of the bullpen and hit his first batter, Andre Ethier. But Rosenthal escaped the jam by striking out Ellis and Skip Schumaker, who started in center field in place of slumping Matt Kemp.
Kemp pinch-hit for reliever Ronald Belisario in the eighth with a man on and grounded into an inning-ending double play, a day after he was removed by manager Don Mattingly in a double-switch with the team ahead by a run in the seventh inning of a 5-3 win.
"Matt really hadn't had a day off in a while," said Mattingly, who cleared the air with Kemp on Sunday morning regarding his decision on the double-switch. "For me, Matt not playing today was the best thing for him, and the best thing for us. Obviously I think you see some of the frustration that he's had, and that's not good for a guy. So we gave him a little breather."
Miller allowed three runs and seven hits in 5 2-3 innings and struck out three in his first career start against the Dodgers, after beginning the day with the fourth-best ERA in the NL at 1.74.
"He's as good as advertised," Ellis said. "He's just like all their arms over there."