LOS ANGELES (AP) - The third time through the lineup was the charm for the Arizona Diamondbacks against Ted Lilly, who took a no-hitter into the fifth inning before he chased during a five-run sixth by the NL West leaders.

Gerardo Parra tied a career best with four RBIs, and Diamondbacks closer J.J. Putz had to quell a bases-loaded threat in the ninth to preserve a 7-2 victory for Joe Saunders.

``You make a decision to try and get something done, and it doesn't work out,' Mattingly said. ``It was one where you question yourself and thing maybe you should have given Lilly another hitter.'

The Diamondbacks, who didn't get their first hit until Ryan Roberts' one-out single in the fifth, grabbed a 5-1 lead after Willie Bloomquist led off the sixth with a bloop single and came all the way around on Aaron Hill's double into the left-field corner. After an intentional walk to Justin Upton, Hill got a huge jump on Lilly and stole third without a throw.

That was all for the left-hander, who departed with a 1-1 count on Paul Goldschmidt. The rookie lined Matt Guerrier's first pitch to left for an RBI single, and Roberts chased Guerrier with another run-scoring single after a walk to Chris Young loaded the bases. Parra greeted Scott Elbert with a two-run single inside third base to cap the rally.

Lilly (9-14) was charged with three runs, three hits and three walks in 5 1-3 innings.

``Lilly was good. The ball was moving as good as I've seen it move from him, so it was good to get him out of the game,' Arizona manager Kirk Gibson said with a chuckle. ``I guess Upton getting to third forced Don Mattingly to take Lilly out.'

The Dodgers, beginning their final homestand of the season, took the lead with Matt Kemp's two-out homer. It was his 33rd of the season and it increased his RBI total to 108 - the most by a Dodger in both categories since 2004, when Adrian Beltre had 48 homers and 121 RBIs.

``He's a good hitter, so what are you going to do? I tried to make some pitches against him and they missed, so I had to come over the plate,' Saunders said. ``It was a good pitch, I thought, but he's a strong guy and he's got good pop the opposite way. But it only counts as one.'

Arizona reduced its magic number to seven for clinching the NL West title. The Diamondbacks, trying for the fifth division crown in the franchise's 14-year history, are 17-3 following a season-worst six-game losing streak. The win put them 24 games over .500, matching their season best.

The Diamondbacks' fortunes have changed dramatically since July 29, when they came to Dodger Stadium for a three-game series and acquired starter Jason Marquis and reliever Brad Ziegler on consecutive days in trades with Washington and Oakland before leaving Los Angeles. Since then, they have gone 28-14 to turn a four-game deficit into an 8 1/2 game lead over San Francisco.

``It's been a good run, but we've got to keep pushing because nothing's guaranteed,' Gibson said. ``You grow as a team, and certain things help you grow. K.T. (general manager Kevin Towers) has done a great job of fine-tuning what we thought some of our weaknesses were. We had our advance meeting today and some of the veteran guys spoke up about some things that we're looking for that are going to help us in the future.'

Saunders (11-12) allowed four hits, struck out four and walked one. The Dodgers' other run against the left-hander came in the seventh on an RBI single by rookie Jerry Sands, who had three hits.

The Dodgers loaded the bases in the ninth, when Alberto Castillo hit pinch-hitter Tony Gwynn Jr. with a 2-2 pitch after Bryan Shaw gave up a pair of two-out singles. But Putz retired Dee Gordon on a grounder to get his 39th save in 43 chances.

Los Angeles, a season-worst 14 games under .500 after a July 6 loss to the Mets, has to go no worse than 9-5 the rest of the way to finish with a winning record after going 80-82 last season. The Dodgers have had consecutive losing seasons only twice since leaving Brooklyn. The last time was 1986-87, when they had identical 73-89 records. It also happened in 1967-68.

The Diamondbacks lead the season series 8-5 with five games remaining, including a three-game set in Phoenix that concludes the regular season.

NOTES: The Dodgers held their annual ``Heroes Night' pregame ceremony, honoring representatives of the armed forces and local police and fire departments. One of them was the late Andrew Garton, a Hawthorne motorcycle officer whose cousin was St. Louis Cardinals C Gerald Laird. Garton, 44, was killed in a traffic accident on May 26 while escorting a funeral procession for Manhattan Beach officer and cancer victim Mark Vasquez. ... Parra also had four RBIs on July 26, 2009, against Pittsburgh. ... Saunders' most troublesome inning this season has been the first, having given up 19 runs and seven homers. The same is true over his career - 117 runs and 25 homers. ... Montero was 0 for 3, ending his 18-game hitting streak. ... The Diamondbacks posted their major league-leading 43rd comeback victory. ... Any combination of Diamondbacks wins and Dodgers losses totaling three would eliminate Los Angeles from the NL West race. Any combination of five losses and Atlanta Braves wins will put the Dodgers out of the wild-card hunt.

Copyright 2016 by STATS LLC and Associated Press.
Any commercial use or distribution without the express written
consent of STATS LLC and Associated Press is strictly prohibited.

VegasInsider.com is not a gambling site, and does not accept or place wagers of any type. This website does not endorse or encourage illegal gambling. All information provided by this website is for news and entertainment purposes only. Any use of this information in violation of federal, state, provincial or local laws is strictly prohibited.

Activities offered by advertising links to other sites may be deemed an illegal activity in certain jurisdictions. This website assumes no responsibility for the actions by and makes no representation or endorsement of any activities offered by an advertiser.