LOS ANGELES (AP) -- A.J. Ellis was kicking himself after the fourth inning when he grounded into a double play with the bases loaded. He had to wait five more innings before he could make up for it.
Ellis hit an RBI single in the ninth, Hanley Ramirez hit a tape-measure, three-run homer in the first inning against Cliff Lee, and the Los Angeles Dodgers beat the Philadelphia Phillies 4-3 on Saturday night.
Lee gave up three runs and four hits in seven innings and struck out 10, after going 7-0 with a 2.00 ERA in his previous 10 starts. The left-hander fielded Ellis' dribbler to the left of the mound in the fourth and threw to the plate to start a 1-2-3 double play before retiring Juan Uribe on a grounder with the Phillies trailing 3-2.
''That at-bat early in the game really ate at me - hitting into that double play,'' Ellis said. ''Cliff Lee is an amazing competitor and his stuff is outstanding, but I've got to do a better job trying to get something to the outfield to get at least one run in.
''I was kicking myself for that at-bat for a long time. When the top of the ninth ended, I knew I was due up fourth in the bottom half and I was just hoping I'd have a chance to redeem myself.''
Ramirez led off the ninth against rookie Justin De Fratus (2-3) with a single before Matt Kemp took a called third strike. After a walk to Andre Ethier, Ellis lined a 2-2 fastball to right, scoring Ramirez.
It was the second loss in this series for De Fratus, who has taken the loss in each of the Phillies' last three defeats. On Thursday night, he gave up the tying and go-ahead runs on a seventh-inning single by rookie Yasiel Puig.
''After falling behind 2-0 to Ethier, I'm not going to allow him to beat me when I have two righties coming up because he's a dangerous hitter,'' De Fratus said. ''This entire road trip had been a rough one, personally. ... We've had plenty of opportunities to win games, and I've almost single-handedly blown it.''
Philadelphia's Chase Utley homered in his first two career at-bats against Hyun-Jin Ryu. Still, the Dodgers won for the seventh in eight games.
Kenley Jansen (2-3) got the win. He came in trying to protect a 3-2 lead in the ninth for Ryu, but was charged with his third blown save in 10 chances as a result of some shoddy defense by his teammates.
Michael Young led off with a single down the right-field line and reached second when Puig misplayed the ball for an error. Young advanced on Utley's grounder and held up on Jimmy Rollins' shallow fly to center fielder Kemp, whose hurried throw to the plate was about 20 feet to the first base side and bounced away from catcher Ellis, allowing Young to score the tying run.
Domonic Brown followed with a triple to left field that Ethier - playing out of position - had difficulty tracking. But Jansen came back to strike out Delmon Young.
Ryu allowed two runs, seven hits and three walks in seven innings and struck out six.
Lefty Paco Rodriguez relieved Ryu and faced one batter, retiring Brown on a foul pop. Then righty Ronald Belisario came in, and the Phillies loaded the bases on a single by Young, a double by pinch-hitter Laynce Nix and an intentional walk to Ben Revere.
Uribe then fielded Carlos Ruiz's grounder to third base and got the force at the plate, with Ruiz just beating the relay to first by Ellis.
Slumping slugger Ryan Howard, who was not in the starting lineup for the second straight game because left-handers were starting for the Dodgers, was sent up to hit for Lee and Los Angeles countered with lefty J.P. Howell.
Manager Charlie Manuel then replaced Howard with Kevin Frandsen, who was robbed of a hit by shortstop Ramirez on a grounder up the middle. Ramirez smothered the ball and made a backhanded flip to second baseman Mark Ellis for the force on Ruiz.
Manuel acknowledged it was difficulty to remove one of baseball's most feared hitters in that situation.
''It was a real tough decision for me to call him back - real hard,'' Manuel said. ''But I just didn't feel good about sending him up against a lefty. ... Believe me, I have all the respect in the world for him. But we just needed a single to give us two runs, and I thought Frandsen was more apt to make contact. And he's got good numbers against lefties.''
Puig, who has hit safely in 21 of his first 25 major league games, started the Dodgers' first-inning rally with a single before Lee walked Adrian Gonzalez. Ramirez drove the next pitch an estimated 439 feet to center.
Utley drove a one-out, 1-1 pitch deep into the right-field pavilion and then hit a 0-1 delivery into the lower seats in the right-field corner two innings later.
It was Utley's 20th career multihomer effort, and marked the first time he went deep twice in a game against the same pitcher since April 28, 2009 - when he did it against current teammate John Lannan, who was then with Washington.
''Chase Utley's been locked in this entire series, so I'm happy we were able to keep those to solo homers,'' A.J. Ellis said. ''Both pitches were probably poorly executed pitches. If Ryu gets them in the area he wants to get them to, Utley might get just a single. But it definitely played into his power zone.''
Revere, who had three hits against Ryu and eight during the first three games of this series, doubled into the right-field corner with two outs in the sixth as the ball caromed off the Puig's left foot and over the short wall for a ground-rule double.
NOTES: Dodgers RHP Josh Beckett will undergo season-ending surgery in about 1 1/2 weeks to relieve pressure on the nerve in his neck. The decision was made after a consultation Beckett had with team physician Neal ElAttrache and Dr. Greg Pearl of Dallas, who will perform the surgery. ... The Phillies pushed back struggling LHP Cole Hamels two days in the rotation to next Thursday at Pittsburgh, which will give him seven days' rest. The 2008 World Series MVP and NLCS MVP is 2-11 with a 4.58 ERA in 17 outings. ... Dodgers RHP Peter Moylan was optioned to Triple-A Albuquerque. The club purchased the contract of RHP Jose Dominguez from Albuquerque.