Rookie Merrill Kelly pitched seven dominant innings and Josh Rojas hit a three-run double in the seven-run eighth for the Arizona Diamondbacks, who beat the lackluster San Diego Padres 9-0 Friday night.

Arizona remained five games behind Milwaukee for the second NL wild card and also need to overtake the Chicago Cubs and New York Mets. The Diamondbacks have won four of their last six games after losing six straight.

San Diego has lost eight of nine.

Arizona Diamondbacks' Carson Kelly follows through on a two-run single during the second inning of the team's baseball game against the San Diego Padres in San Diego, Friday, Sept. 20, 2019. (AP PhotoAlex Gallardo)

Arizona Diamondbacks' Carson Kelly follows through on a two-run single during the second inning of the team's baseball game against the San Diego Padres in San Diego, Friday, Sept. 20, 2019. (AP PhotoAlex Gallardo)

The 30-year-old Kelly (12-14) was impressive in his final road start this season. He held the Padres to two hits and struck out nine while walking three.

San Diego had only two baserunners in the first four innings, one of whom was erased by a double play. The Padres didn't get their first hit until Luis Urías singled with two outs in the fifth.

Kelly got all the runs he needed when Carson Kelly hit a two-run single in the second off left-hander Eric Lauer.

Arizona Diamondbacks shortstop Nick Ahmed throws out San Diego Padres' Greg Garcia on a ground ball during the first inning of a baseball game in San Diego, Friday, Sept. 20, 2019. (AP PhotoAlex Gallardo)

Arizona Diamondbacks shortstop Nick Ahmed throws out San Diego Padres' Greg Garcia on a ground ball during the first inning of a baseball game in San Diego, Friday, Sept. 20, 2019. (AP PhotoAlex Gallardo)

The Diamondbacks sent 12 batters to the plate in the eighth and scored seven runs during a Padres' bullpen meltdown. The Diamondbacks had four hits, drew three walks and had one hit batsman. Besides Rojas' bases-clearing double, Wilmer Flores hit a two-run single, San Diegan Adam Jones had an RBI single and pinch-hitter Abraham Almonte drew a bases-loaded walk.

Lauer (8-10) also struck out nine but allowed two runs and two hits in six innings, with four walks.

TRAINER'S ROOM

San Diego Padres' Manny Machado juggles his bat after striking out during the fourth inning of the team's baseball game against the Arizona Diamondbacks in San Diego, Friday, Sept. 20, 2019. (AP PhotoAlex Gallardo)

San Diego Padres' Manny Machado juggles his bat after striking out during the fourth inning of the team's baseball game against the Arizona Diamondbacks in San Diego, Friday, Sept. 20, 2019. (AP PhotoAlex Gallardo)

Diamondbacks: RHP Luke Weaver (4-3, 3.03) is scheduled to start Saturday night.

Padres: Struggling rookie RHP Cal Quantrill (6-8, 5.33) is scheduled to make his 23rd appearance and 18th start. He is 0-4 with a 15.12 ERA in his last four starts since Aug. 27

More AP MLB: https://apnews.com/MLB and https://twitter.com/AP_Sports

Arizona Diamondbacks manager Torey Lovullo, right, argues with home plate umpire Todd Tichenor during the seventh inning of the team's baseball game against the San Diego Padres in San Diego, Friday, Sept. 20, 2019. (AP PhotoAlex Gallardo)

Arizona Diamondbacks manager Torey Lovullo, right, argues with home plate umpire Todd Tichenor during the seventh inning of the team's baseball game against the San Diego Padres in San Diego, Friday, Sept. 20, 2019. (AP PhotoAlex Gallardo)