Arizona made sure there wouldn't be any late heroics in a fourth straight game by the rival Los Angeles Dodgers.
Instead, it was the Diamondbacks who came up big.
David Peralta hit a tiebreaking RBI single in the eighth inning and the Diamondbacks rallied for an 8-5 win over the NL West-leading Dodgers on Monday night.
The Dodgers had won their last three on game-ending home runs.
Former Dodger Tim Locastro put the game out of reach with a two-run single off losing pitcher Dylan Floro (2-2), part of a four-run outburst in the eighth for the Diamondbacks. Christian Walker and starting pitcher Zack Greinke homered, Ketel Marte had two hits for his seventh consecutive multi-hit game and Arizona ended the Dodgers' winning streak at six games.
"I tell these guys, once we're in a tie game, let's play all night until somebody comes out and does their job. And I'll bet on us to do it right," Diamondbacks manager Torey Lovullo said.
The highly anticipated battle of Cy Young Award winners didn't produce much of a pitchers' duel, though both the Dodgers' Clayton Kershaw and Greinke lasted six innings.
Yoan Lopez (1-1) worked a scoreless inning and earned the win.
Max Muncy drove in three runs for the Dodgers.
The Dodgers jumped on Greinke for three runs in the first inning. Joc Peterson and Justin Turner singled, and with one out, Cody Bellinger doubled to right-center, plating the first run. Muncy grounded out to first, allowing Turner to score.
Then, Chris Taylor doubled to right field, bringing home Bellinger. Both Bellinger and Taylor hit first pitches from Greinke.
"I just came out throwing strikes, they came out swinging," Greinke said.
Kershaw was burned twice with two-out mistakes. Walker took him deep to left-center field in the bottom of the first, tying the game. That gave Walker three home runs in his first six career at-bats against the Dodgers' ace, tying him for the most homers against Kershaw among active players.
"Baseball's funny. Things come in bunches," Walker said. "For whatever reason, I see that slider well. Two of them for sure, maybe all three (home runs) on that pitch."
Greinke's second-inning home run was a line drive into the left-field seats, his career-high third of the season.
"It was a bad game. It was just unfortunate they scored three runs early for me and I give it right back," Kershaw said. "It was a tough one for sure. It just lands on my shoulders to do better the next time."
Both pitchers settled down after early struggles, but the Dodgers squandered an opportunity to at least draw even in the sixth. Bellinger singled and Muncy reached on a throwing error, before Greinke struck out the side.
The Dodgers threatened again in the seventh, and after Greinke departed one batter in. Bellinger was intentionally walked a second time, loading the bases. Muncy drew a two-out walk from Yoshihisa Hirano, tying the game at 4-all.
Hirano battled back from a 3-1 count on Taylor, striking him out looking and ending the inning.
Greinke and Kershaw had identical lines of six innings and four runs on seven hits allowed. Greinke struck out six; Kershaw struck out two.
Greg Holland got one out in the ninth for his 200th career save.
Ahmed leaped high in the air to take a base hit away from the Dodgers' Will Smith in the top of the eighth, snaring a line drive and drawing a standing ovation from Diamondbacks fans, plus a tip of the cap from teammate Eduardo Escobar.
Greinke's home run marked the seventh time in history of that a former Cy Young winner hit a home run against a fellow former Cy Young winner, according to the Elias Sports Bureau. Greinke joined former Dodgers great Don Drysdale as the only former Cy Young winners to hit multiple career home runs against other former Cy Young winners.
Greinke's homers came off former Phillies star Cliff Lee in 2012 and Kershaw on Monday. Drysdale hit two home runs off Warren Spahn in 1965.
"It's not as big a shock as it used to be," Greinke said of pitchers hitting home runs.
FAN INCIDENT, AGAIN
For the second straight game, a female fan ran from out of the stands toward Bellinger. She reached him before security got there and escorted her from the field.
It happened in the bottom of the eighth inning.
"I had a feeling that it was definitely a possibility just because it kind of blew up on social media. I'm just trying to play a game and I don't think I have to worry about if anyone comes on the field," Bellinger said.
"I had a feeling she was harmless ... but it could potentially get dangerous, especially if it keeps getting blown up like it is."
A 14-year-old girl attempted to get a hug from Bellinger during Sunday's game at Dodger Stadium as he stood in the outfield.
The Dodgers had Pederson at first base on Monday, a recent development, and manager Dave Roberts hopes to use Austin Barnes, Monday's catcher, at second base this week. Also, Roberts is looking to give catcher Russell Martin a start at third base. "Just kind of continue to increase options for our roster," Roberts said.
Diamondbacks: Marte was back in the lineup after missing the last two days dealing with a minor groin injury. ... RHP Luke Weaver's MRI showed improvement on his elbow area, but there is no timetable for when he will start throwing.
Dodgers: Roberts announced before the game that RHP Ross Stripling (3-2) will start Tuesday's game. Stripling has made six starts in his 20 appearances this season. Roberts also said the current plan is to call up RHP Tony Gonsolin from Triple-A Oklahoma City to start Wednesday's game. Gonsolin was the organization's minor league pitcher of the year in 2018 and would be making his big-league debut.
Diamondbacks: LHP Robbie Ray (5-4, 3.87 ERA) brings a 7-4 mark and a 2.89 ERA in 17 career starts against the Dodgers when he takes the mound on Tuesday.