LOS ANGELES -- Andrew Cashner pitched seven strong innings to win for the first time since mid-April, Jedd Gyorko hit a two-run homer, and the San Diego Padres snapped a six-game skid by beating the Los Angeles Dodgers 6-3 Tuesday night.
The Dodgers had their four-game winning streak end, and their NL West lead was cut to 2 1/2 games over San Francisco.
The Padres totaled 12 runs during their losing streak, but they built a 5-0 lead for Cashner by the third inning, allowing him to beat the Dodgers for the first time.
Cashner (3-7) allowed two runs and nine hits, struck out two and walked one after being winless in 11 outings. His last victory was against Colorado on April 16. The right-hander improved to 1-2 against the Dodgers.
Roberto Hernandez (8-11) gave up five runs and three hits in three innings, struck out three and walked one.
Gyorko's homer on the first pitch he faced from Hernandez in the third extended San Diego's lead to 5-0.
The Padres went ahead 3-0 with two outs in the second.
Cashner helped himself with a two-run double, and Cory Spangenberg followed with an RBI single.
Dodgers shortstop Hanley Ramirez committed the first of his two errors in the inning on Cashner's double to deep center with runners on the corners.
The throw to the infield bounced past two cutoff men, including a sprawling Ramirez, allowing the runner on first to score and Cashner to advance to third.
Ramirez made an effort to get Cashner at third after recovering the ball on the lip of the infield grass, but his awkward, backhanded throw hit the Padres pitcher as he slid into third.
That play came a night after the Dodgers committed three throwing errors on the same play, allowing San Diego to score two runs in Los Angeles' 9-4 victory.
The Padres added a run in the eighth on Rene Rivera's sacrifice fly.
Padres: Ian Kennedy (10-12, 3.75) has worked six or more innings in 20 of his 29 starts, including 20 of his last 28 since April 6.
Dodgers: Dan Haren (12-10, 4.17) has pitched well in his last six starts, going 4-1 with a 2.04 ERA and limiting batters to a .203 average.