PHOENIX -- Arizona Diamondbacks third baseman Jake Lamb once got mad when teams intentionally walked a batter to face him. He respects the choice now, and he is slowly learning to get even.
Lamb hit a go-ahead grand slam, his second homer of the game, after A.J. Pollock was walked to loaded the bases in front of him in the seventh inning, propelling the Diamondbacks to a 6-3 victory over the streaking Los Angeles Dodgers on Tuesday at Chase Field.
Lamb, hitting .143 in 91 at-bats against left-handed pitchers this season, yanked an outside slider off the right field foul pole against lefty Tony Watson (5-4) to overcome a 3-2 deficit.
"I don't take it personally or anything," Lamb said. "It's just one of those things. You have to keep working at the lefties, and finally hopefully that won't happen. It used to tick me off a little bit, but then I would try to do too much.
"The fact that you know it is going to happen also helps."
Chris Iannetta singled to open the seventh inning and Adam Rosales was hit by a pitch with one out before David Peralta moved up the runners with a groundout. Manager Dave Roberts opted to walked Pollock to load the bases for Lamb.
"I know the numbers," Lamb said. "If you know the numbers, you want to go after me with a lefty like Watson. It didn't work out for them tonight, but I imagine they would probably do the same thing if it comes up."
Justin Turner had two homers for the Dodgers (79-33), who had won 44 of their previous 51. They have the third-best 52-game stretch in modern history, behind the 1912 New York Giants and the 1906 Chicago Cubs.
"I love the matchup. I loved it," Dodgers manager Dave Roberts said. "As good as Jake is I will take Tony against him any day. Left the slider up and still didn't take a good swing at it, but he elevated it and unfortunately for us hit the foul pole."
Iannetta had two hits and a homer for Arizona (64-48), which moved one-half game ahead of the Colorado Rockies to lead the NL wild-card race.
The D-backs are 37-18 at home, the second-best home record in the majors behind the Dodgers' 47-13 mark.
David Hernandez (1-0) struck out the only batter he faced in the seventh inning for his first victory since rejoining the D-backs at the trade deadline.
Archie Bradley pitched a scoreless eighth inning and Fernando Rodney pitched the ninth for his 26th save.
"It was a pretty special night," Arizona manager Torey Lovullo said. "The Dodgers roll into town with tremendous momentum and we played one of our better games in quite some time."
Arizona starter Zack Godley gave up three runs and eight hits in 6 2/3 innings. He struck out five and walked one.
Dodgers starter Kenta Maeda gave up four hits and one run in five innings. He struck out six and walked one.
The Dodgers posted at least two extra-base hits in a 52nd consecutive game, the longest streak since at least 1913, according to STATS LLC.
Iannetta hit his ninth homer of the season off Maeda leading off the fifth inning to make it 2-1.
Ketel Marte followed with a single and took third on an errant Maeda pickoff throw, but Maeda got out of the inning with a strikeout, a grounder to the mound and a fly out.
Turner's second homer, his 15th of the year, with one out in the fifth inning made it 2-1.
NOTES: LHP Clayton Kershaw (lower back strain) played catch Tuesday afternoon after rejoining the Dodgers on the road. He is expected to throw again Wednesday before a possible bullpen session this weekend, manager Dave Roberts said. Kershaw has been on the disabled list since July 28. ... LHP Robbie Ray (concussion protocol) threw a 28-pitch bullpen session at Arizona's spring training facility Monday. He has not pitched since being struck by a line drive in a July 28 start in St. Louis. ... Arizona LHP Anthony Banda will make his third major league start in the final game of the three-game series Thursday. He recorded his first major league victory in a 2-1 victory at San Francisco on Friday. ... The 1912 New York Giants had a 51-8 stretch after starting the season 3-3. The 1906 Cubs had a 49-6 run.