AP Sports Writer
PHOENIX (AP) -- The Dodgers were going to head back to Los Angeles from a successful road trip regardless of what happened in their series finale against Arizona.
To close it out with a dramatic comeback and complete a three-game sweep, they couldn't have scripted it any better.
Hanley Ramirez and A.J. Ellis hit consecutive homers in the 14th inning after Ellis tied the game with two outs in the ninth, helping the Los Angeles Dodgers beat first-place Arizona 7-5 Wednesday night for their first sweep of the Diamondbacks in two years.
"For us to walk out of here fighting and grinding the way we did, it's going to make for a real fun trip home," Ellis said.
Los Angeles won six of its first eight games on the road trip, including the first two against Arizona.
The Dodgers closed it out with a flourish.
With the Dodgers still in it because of Ellis' hit in the ninth off Heath Bell, Ramirez hit the first pitch of the 14th off Josh Collmenter (4-2) just over the wall in right field. Five pitches later, Ellis made it 7-5 with his fourth homer.
Kenley Jansen (3-3) pitched the final two innings for the Dodgers, who used all of their position players and had Zack Greinke, Monday's starter, pinch hit in the 10th inning.
A team that was 12 games under .500 and 9
Copyright 2013 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.