Matt Kemp hit a two-run homer in the 12th inning, 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.

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 inning with the bases loaded to give Philadelphia a 3-1 lead.

But the Dodgers responded with two in the bottom half against closer Jonathan Papelbon, whose blown save was his third in 24 opportunities.

(Copyright 2012 by The Associated Press.  All Rights Reserved.)