DENVER -- Brandon Barnes tripled home the winning run in the 10th inning Saturday to give the Colorado Rockies a 5-4 win over the Los Angeles Dodgers and end their eight-game losing streak.

The right fielder's two-out hit banged off the wall in right-center and scored first baseman Justin Morneau, who had singled with one out off Chris Perez (0-3).

The winning pitcher was Franklin Morales (4-4), who pitched 1 1/3 innings.

An unearned run with two out in the seventh off starter Zack Greinke enabled the Rockies (29-32) to tie the game at 4 after catcher Tim Federowicz had put the Dodgers (32-31) ahead with a three-run shot in the top of that inning on the first pitch from Nick Masset.

Center fielder Drew Stubbs chopped an infield hit to third base that Justin Turner caught barehanded but then threw wildly past first. Stubbs took second on the error and scored on left fielder Corey Dickerson's single.

Jhoulys Chacin, who is winless in seven starts, held the Dodgers scoreless for six innings on four hits before they broke through in the seventh. After left fielder Matt Kemp led off with a walk, center fielder Andre Ethier and Turner singled to cut the Rockies' lead to 3-1 and chase Chacin. Federowicz then connected off Masset for his first home run in 64 at-bats -- since Sept. 18, 2013, at Arizona.

A two-run fifth put the Rockies ahead 3-0. That inning began with three straight singles -- the first by catcher Michael McKenry, who took second on a wild pitch. He moved to third on third baseman Ryan Wheeler's single and scored on one by second baseman Josh Rutledge, who played for the first time in six games.

Wheeler moved to third on that hit and was tagged out in a 3-5-2 rundown after Chacin bunted. Wheeler stayed in the rundown long enough for Rutledge to reach third and Chacin to get to second. Outfielder Charlie Blackmon followed with a run-scoring single.

The Rockies scored a run in the second after shortstop Troy Tulowitzki led off with an infield single. He tagged up and took second when Morneau hit a long foul ball that Kemp caught in the left-field corner. Tulowitzki scored on a single by McKenry, a late addition to the lineup after catcher Wilin Rosario was scratched due to illness.

NOTES: Dodgers 2B Dee Gordon was removed from the game in the fourth with right hip discomfort and is listed day-to-day. ... Dodgers RF Yasiel Puig left in the fifth inning with a right hip flexor strain and is listed day-to-day. ... RHP Christian Bergman will make his major league debut Monday and start for the Rockies, taking the turn of injured RHP Jordan Lyles. ... Rockies C Wilin Rosario was scratched from the lineup due to illness. ... Dodgers assistant hitting coach John Valentin was hit near the left eye with a ball that ricocheted in the indoor batting cage. The initial exam at a hospital revealed no damage to the eye and his vision was good, and Valentin was scheduled to undergo a CT scan. ... Dodgers RHP Chad Billingsley, who underwent Tommy John surgery on April 24, 2013, is scheduled to start his rehab assignment for the second time Sunday and throw about 30 pitches for High Class-A Rancho Cucamonga. ... Rockies RF Michael Cuddyer, who suffered a left shoulder strain Thursday, was not in the lineup for the second straight day.