Updated

PHOENIX (AP) -- Giancarlo Stanton extended his club record with his 57th home run and set a team mark with his 125th RBI, lifting the Miami Marlins over the Arizona Diamondbacks 12-6 on Saturday night.

Arizona could have clinched a playoff spot with a win, but will have to wait another day at least. The Diamondbacks can lock up an NL wild card on Sunday with a win or losses by Milwaukee and St. Louis.

Arizona lost for the fourth time in six games, having given up 30 runs in the last three games.

Justin Bour added two run-scoring singles and a late two-run home run for Miami, which has won four of five.

The Marlins scored five runs -- taking advantage of a pair of errors by Arizona starter Taijuan Walker (9-9) -- in the third to take a 5-1 lead. Miami chased Walker after 3 2/3 innings, getting seven runs and six hits off him. Walker struck out six, walked three, hit a batter and had a wild pitch.

Miami starter Dillon Peters, in fifth career start, went four innings, allowing five runs, six hits and three walks. Brian Ellington (1-1) earned the win after pitching the fifth and sixth, allowing just J.D. Martinez's 43rd home run of the season.

Miguel Rojas led off Miami's third inning with a double down the right-field line, and then Walker couldn't field Peters' sacrifice bunt to the third base side of the mound. Dee Gordon followed with a tapper on the first-base side that Walker also couldn't handle, allowing Rojas to score from third and Peters to go to second. Stanton doubled to left, scoring Peters and Gordon, and Bour later singled in another run.

Paul Goldschmidt hit his 36th home run of the season, a three-run shot to left in the third to cut the lead to 5-4. He has 120 RBIs. Brandon Drury added his 13th home run of the season.

UP NEXT

Arizona and Miami finish their weekend series on Sunday with RHP Dan Straily (10-9, 4.17) scheduled to face Patrick Corbin (14-13, 4.14).