LOS ANGELES (AP) -- The game began with an intense pitcher's duel between Cy Young Award-winning left-handers Clayton Kershaw and Cliff Lee. That lasted for eight innings. It ended four innings later with slugger Matt Kemp doing what he does best.
Kemp hit a two-run homer in the 12th, giving the Los Angeles Dodgers a 5-3 victory over the Philadelphia Phillies on Wednesday.
Rookie left-hander Jake Diekman (2-0) walked Mark Ellis with one out and Kemp drove a 1-0 pitch the other way into the pavilion seats in right-center for his 13th home run and sixth career walkoff homer, capping the 4-hour, 25-minute marathon.
''I was struggling all day, I had to do something, man,'' Kemp said. ''I think we were all getting a little frustrated and a little tired, but we fought until the end. We got the 'W' and that's all that matters. It feels good to hit that home run. That's the hardest ball I've hit since I've been back (from the disabled list). I feel really good. My legs are getting under me.''
Jamey Wright (4-2), the sixth Dodgers pitcher, worked one inning for the victory as the Dodgers ended a four-game losing streak.
Hunter Pence hit a two-run single in the 10th with the bases loaded to give Philadelphia a 3-1 lead. But the Dodgers responded with two runs in the bottom half against closer Jonathan Papelbon, whose blown save was his third in 24 opportunities.
Pinch-hitter and former Phillie Bobby Abreu had an RBI single and scored the tying run when Kemp beat out an infield single to deep shortstop with two outs and runners at the corners. The rally also included a dribbler to the left of the mound by Tony Gwynn Jr. that Papelbon couldn't make a play on.
''It's tough. It's one of those outings where you really can't do very much about it,'' Papelbon said. ''I feel like I made the pitches I wanted to make. But there were swinging bunts and bloop hits and stuff like that. It's just part of the game. But we've got to stay positive and, look at the bigger picture, and realize that we came out of the All-Star break taking two series on the road. This was the kind of start that we needed.''
Dodgers reliever Javy Guerra walked three in the 10th, including an intentional pass to Chase Utley. Pence hit the right-hander's 1-0 pitch to left field to drive in two.
Phillies manager Charlie Manuel used four relievers in the ninth, including Michael Schwimer, who escaped a bases-loaded jam by striking out pinch-hitter James Loney on a pitch in the dirt.
''Our pitching is the reason why we've been doing so well lately,'' Pence said. ''We won the first two games despite scoring only three runs in each game, and we almost won this game with three runs. That's a credit to our pitchers. You've even got to tip your cap to Papelbon. He's thrown a lot of pitches going three days in a row, so he's a warrior. But they found a way to battle, and you've got to give them some credit.''
Less than 24 hours after the Phillies won 3-2 on a bases-loaded two-run single by Pence in the eighth inning against Kenley Jansen, they loaded the bases again against the Dodgers' closer in the ninth. But he escaped this time when Jason Pridie flied out as a pinch-hitter for Lee.
It was the ninth no-decision for Lee, and the seventh to go extra innings. The three-time All-Star allowed a run and two hits - the eighth time in 16 starts that he yielded fewer than three earned runs.
''Not once this year have I said anything about being frustrated,'' Lee said. ''I can only control what I can control, and that's to make pitches, get as deep into the game as I can and try to give the team a chance to win. I would have loved to win this game, but it's over now and there's nothing you can do about it. I thought I pitched a good game. I made a mistake to Rivera in the second and he hit a home run, but otherwise, things went really well.''
Lee's only victory was on July 4, when he beat the Mets 9-2 at New York. In his other start this season against the Dodgers, he retired 21 of his first 24 batters and took a shutout into the eighth before giving up a two-run double to Elian Herrera in a 2-1 loss at Philadelphia.
The 2008 AL Cy Young winner retired 15 of his first 16 batters in the rematch and threw 56 of his 89 pitches over the first five innings. His biggest out came in the sixth, when he struck out Kemp with two men on.
Kershaw allowed a run and five hits, struck out seven and walked none. It was the 13th time in 20 starts this season that he allowed fewer than three earned runs, and he is 6-3 in those games.
''For the most part, I was able to throw strikes and just kind of make them beat me,'' Kershaw said. ''We needed a win, so we'll take them any way we can get them right now. We battled all the way through and Matty came up huge again. But the big inning was getting to Papelbon and getting back in the game. That's the sign of a good team.''
Juan Rivera, starting at first base for the Dodgers instead of Loney with a lefty starting, opened the scoring in the second inning with his fourth homer.
NOTES: Guerra was reinstated from the bereavement list after visiting his ailing father, who had a heart attack last Friday night. RHP Stephen Fife, who allowed a run over six innings Tuesday night and got a no-decision in his major league debut, was optioned back to Triple-A Albuquerque. ... Rivera is 7-for-30 against Lee with four homers. ... The crowd of 39,955 pushed the Dodgers' home attendance total past the 2-million mark in 49 home dates - six fewer than last season.