DENVER (AP) The Los Angeles Dodgers are confident they will win the NL West soon. The Colorado Rockies are trying to make sure it doesn't happen at Coors Field.

Carlos Gonzalez hit a two-run homer in the bottom of the ninth inning and the Rockies beat the Dodgers 8-6 Saturday night, preventing Los Angeles from moving closer to clinching the division.

The Dodgers' magic number remained at two for closing out San Francisco.

More from FoxSports

''I think we're all confident it's going to happen, just making that final push and sprinting across that line,'' catcher A.J. Ellis said.

Nolan Arenado hit a grand slam for his 40th home run and Justin Morneau had four hits for the Rockies. Andre Ethier homered for the Dodgers, who said they aren't worried despite having lost six of eight.

''At this point it's tough to win games down the stretch, it's tough to close things out,'' manager Don Mattingly said.

The Rockies want to prevent LA from clinching on the same field where Pittsburgh celebrated sewing up a playoff spot Wednesday.

The Pirates swept a four-game series from Colorado to reach the postseason for the third consecutive season.

''They came away with four wins and celebrated in our house,'' Gonzalez said. ''That's the last thing you want to see. LA is having the same opportunity now. We are professionals we will fight until the last out.''

If the Dodgers fail to clinch Sunday they'll have four tries to wrap up the division in San Francisco starting Monday. It won't be easy, however. The Giants are 6-0 at home against the first-place Dodgers.

''We want to win our way in. Hopefully tomorrow we can come out and win and Oakland can take a game from them and we can celebrate tomorrow,'' Ellis said. ''If not, we can do it on their field, which would be sweet as well.''

DJ LeMahieu, who had three hits, led off the ninth with a single against Yimi Garcia (3-4). Gonzalez, who also had three hits, worked the count to 3-1 before hitting a 94 mph fastball over the wall in center for his 39th home run.

''We've got a phenomenal fastball hitter against a guy with a phenomenal fastball,'' Ellis said. ''He won the matchup tonight.''

Justin Miller (3-2) pitched the top of the ninth for the win.

Colorado's first six batters of the game got hits off Brett Anderson, with Arenado providing the big blow. He followed three straight singles with a drive over the wall in center for his third career slam.

Arenado tied Toronto's Josh Donaldson for the most RBIs in the majors with 121.

''Nolan just keeps adding to his numbers this season,'' manager Walt Weiss said.

Ethier had a two-run homer in the second to slice the deficit in half. Colorado tacked on runs in the second and third to build a 6-2 lead.

The Dodgers got another run in the fifth and chased starter Kyle Kendrick with a three-run sixth to tie it.

Joc Pederson's diving catch on Corey Dickerson's drive to left-center in the Colorado seventh kept the game tied at 6.

RAREFIED AIR

Arenado became the seventh Rockies player to hit 40 or more home runs in a season and the first since the humidor was used starting in 2002.

TRAINER'S ROOM

Dodgers: 1B Adrian Gonzalez was scratched from the lineup because of a pinched nerve in his lower back. Mattingly said Gonzalez will also sit Sunday but he added he doesn't think it's serious. ''It's not something honestly that we will worry about,'' Mattingly said. ''Every time he rests it, the back feels good.''

Rockies: SS Jose Reyes missed his third straight game with a sore left Achilles injury. Weiss said he doesn't think Reyes will need to be shut down for the season. ... RHP Miguel Castro is out with a sore back.

UP NEXT

Dodgers: LHP Alex Wood (11-11, 3.60) is 2-1 with a 4.35 ERA in four career starts against Colorado.

Rockies: RHP Chris Rusin (5-9, 5.39) has tossed Colorado's only two complete games at Coors Field this season.