DENVER (AP) -- Pinch-hitter Pat Valaika and David Dahl each homered in an eight-run fifth inning, Nolan Arenado had four hits including a home run and the Colorado Rockies beat Los Angeles 13-9 on Friday night, snapping a 12-game losing streak to the Dodgers.
The Rockies withstood a three-run homer by Max Muncy and a two-run drive by Alex Verdugo to record their first win over the Dodgers since last Sept. 8. The skid was the second-longest losing streak to one team in Rockies history, eclipsed only by a run of 16 consecutive losses to the Atlanta Braves from 1993-94.
Colorado had to weather another harrowing finish against the Dodgers, who used a four-run ninth to beat the Rockies the night before after three straight walk-off wins to sweep a series between the teams in Los Angeles a week ago.
Muncy beat out a slow roller down the first base line to drive in a run in the Dodgers' eighth and pull Los Angeles within one, but the Rockies added three runs in their half of the inning on Daniel Murphy's sacrifice fly and Chris Iannetta's two-run double.
Scott Oberg finished up by pitching a scoreless ninth.
Trailing 5-2 after Verdugo's two-run homer in the fourth, the Rockies broke through for their biggest inning of the season in their half of the fifth, scoring eight times, including a pair of unearned runs off three Los Angeles errors.
Valaika, batting for starter Antonio Senzatela, snapped a 0-for-30 slump with his first home run of the season, a two-run drive off Hyun-Jin Ryu. It was the fifth career pinch homer for Valaika and his first since Sept. 17, 2017.
Valaika added a pinch single in his second at-bat of the inning, in which Colorado sent 13 men to the plate. Ian Desmond doubled and Daniel Murphy singled to drive in runs and Dahl's two-run homer chased Ryu.
Successive errors, on a throw to second and a fielding misplay, by first baseman Murphy opened the door to three unearned runs by the Dodgers in the top of the first. Arenado connected for his 20th home run of the season after Charlie Blackmon singled to start the Rockies' first to get Colorado within a run.
Senzatela (7-5) went five innings and allowed five runs on seven hits. He walked five -- one intentionally -- and struck out two.
Ryu (9-2) went four innings and allowed a season-high seven runs on nine hits. He struck out four and walked one.
The game was delayed for 19 minutes midway through the seventh inning because of lighning in the area.
Dodgers: INF David Freeze ran sprints and is on course to return next week from a left hamstring strain that landed him on the 10-day injured list. ... LHP Scott Alexander is in Arizona rehabbing a left forearm inflammation. He was placed on the 10-day IL June 11.
Rockies: RHP Seunghwan Oh threw 20 pitches in a simulated game Friday. He is expected to pitch another simulated game on Tuesday as he works toward returning from a left abdominal strain that put him on the 10-day IL earlier this month. ... SS Trevor Story is joining the Triple-A Albuquerque Isotopes this weekend as part of a rehab assignment. Story went on the IL with a thumb injury a week ago and the Rockies hope to have him back prior to the All-Star break.
Dodgers: LHP Clayton Kershaw (7-1, 3.07 ERA) has gone 22-7 with a 3.16 ERA in 40 career starts against Colorado.
Rockies: RHP Jon Gray (8-5, 3.92 ERA) is slated to make his second start of the season against the Dodgers and first since April 6 when he took the loss, going six innings and allowing five runs.