PHOENIX (AP) -- Matt Kemp needled teammate Manny Machado in a happy Los Angeles Dodgers clubhouse after Monday night's 7-4 win over the Arizona Diamondbacks, giving the star slugger a hard time for not running full speed out of the batter's box while admiring a long drive to the wall in the ninth inning.
The hit went for a double, falling just short of a home run, and gave Machado his second RBI of the game in a three-run ninth inning.
''I thought I got it,'' Machado said with a grin. ''At least I got the RBI and we got the lead. I'll take it. I'll wear it.''
Machado also drove in the go-ahead run with a groundout deep into the shortstop hole with the bases loaded in the seventh to score Yasiel Puig. That helped the NL West-leading Dodgers stay 1 1/2 games ahead of Colorado, which routed Philadelphia 10-1 at Coors Field.
David Freese homered and had three hits to back Clayton Kershaw (9-5), who allowed three runs and six hits over six innings in his fifth start against Arizona this season. He struck out six and walked one.
The defending NL champions have won six of seven.
Freese is hitting .375 since joining the Dodgers in an Aug. 31 trade with Pittsburgh. He finished 3 for 4 with two RBIs.
''To go from thinking you're not going to be traded to all of a sudden you're a Dodger and you're in there 24 hours later, you understand what this organization's trying to do and you get called upon to help out,'' Freese said. ''Just kind of doing my thing and filling my role.''
Ketel Marte homered and drove in three runs, all off Kershaw, and A.J. Pollock went deep against closer Kenley Jansen in the ninth. The Diamondbacks, already eliminated from playoff contention, have lost four straight and eight of nine.
With the Dodgers trailing 3-2 to start the seventh, Yasmani Grandal walked and Puig came through with a pinch-hit single off reliever Andrew Chafin (1-6). Brad Ziegler gave up a pinch-hit single to Max Muncy that tied it 3-all.
''That was the difference in the game, Yasiel's at-bat, Muncy's at-bat, and also defensively,'' Dodgers manager Dave Roberts said. ''Really good to see everyone had their hand in it.''
With one out, Freese singled to load the bases before Machado knocked in the tiebreaking run. The Dodgers scored three runs in the ninth on two wild pitches by Yoshihisa Hirano and Machado's double.
Diamondbacks starter Robbie Ray went five innings, allowing two runs and four hits with seven strikeouts and three walks.
Arizona tied it at 1 in the bottom of the first with Eduardo Escobar's single and Marte's triple, which eluded Kemp's lunging catch attempt in right field. Marte's homer landed in the seats in left-center in the third for a 2-1 Arizona lead.
''I had a good approach with Kershaw,'' Marte said. ''I was just trying to see the ball up and hit the ball in the right-center gap. Trying to put my best swing on it.''
Freese ripped a 1-1 fastball from Ray opposite field over the right-field fence, tying it at 2 in the fifth. That brought chants of ''Let's go Dodgers!'' from the many Los Angeles fans in the Chase Field stands.
PLAYING TO WIN
Before the game, Arizona manager Torey Lovullo said he told Rockies manager Bud Black that the Diamondbacks would do their best to try to beat the Dodgers, even if they rested a regular or two. Arizona didn't start the game with its top lineup but finished it that way.
Roberts was asked how much he can appreciate that Arizona is still competing.
''We would expect nothing less from Torey and the organization over there,'' Roberts said. ''First class. They're going to play 162 games, that's what we'd expect.''
YOU'RE OUTTA HERE
Dodgers outfielder Joc Pederson was ejected in the top of the ninth by plate umpire Joe West after striking out swinging.
Dodgers: RHP JT Chargois was reinstated from the disabled list. He missed more than a month with nerve irritation. ''I'm just proud of him to get back out there,'' Roberts said.
Diamondbacks: 1B Christian Walker was hit near his nose by a pitch from Kenta Maeda with two outs in the eighth and left the game with a deep bruise. Lovullo said Walker had a CT scan after the game.
Dodgers: RHP Walker Buehler (7-5) brings a 2.74 ERA into his scheduled start Tuesday against Arizona. Opponents are batting .198 against the rookie.
Diamondbacks: RHP Matt Koch (5-5) is set to face the Dodgers. He's won each of his last three starts at home since May 28.
More AP MLB: https://apnews.com/tag/MLB and https://twitter.com/AP-Sports