SAN DIEGO — 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 lacklustre 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.

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.

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

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