PHOENIX — Patrick Corbin’s run of outstanding starts came to an end, and so did Arizona’s team-record 13-game winning streak.

Manuel Margot drove in four runs with a triple, double and single to lead the San Diego Padres to a 10-6 victory over the Diamondbacks on Friday night.

“I’m definitely disappointed letting this streak end on my start,” Corbin said. “It’s something you never want to do when you have a streak going is be that starter to end it.”

Down 8-0, the Diamondbacks scored twice in the fifth and then added four more runs in the sixth. Arizona had a chance to take the lead later in the inning, but Padres reliever Craig Stammen retired two batters with the bases loaded to preserve an 8-6 lead.

Colorado beat the Dodgers in Los Angeles 5-4 to pull within six games of the Diamondbacks with for the NL’s top wild-card spot. The Rockies play a four-game series in Arizona next week.

The Diamondbacks were returning from a 6-0 road trip and had swept a three-game series from the Dodgers and Rockies. The loss was only Arizona’s second in 16 games.

Jordan Lyles (1-2), in his second start for the Padres, pitched into the sixth.

Corbin had two outs and the bases loaded when he faced Lyles in the fourth inning in what was still a scoreless game.

Lyles drove in two runs in the fourth with a two-out, bases-loaded, broken-bat bloop single.

“It wasn’t a particularly well-hit ball, but it was enough,” Arizona manager Torey Lovullo said. “Those were two big runs and I think it may have distracted Patrick and you can see what happened after that.”

Corbin called it “probably a pitch I’d like to have back.”

“Maybe a slider to the pitcher there,” he said. “I just threw him a fastball first pitch. If I was hitting there I’d probably be swinging too.”

San Diego went on to score six in the inning.

The Padres rocked Corbin (13-12) for eight runs on 11 hits, seven for extra bases, in 4 1-3 innings. In his previous five starts, the Arizona left-hander had gone 5-0 and allowed one run.

“I’ve just got to do a better job,” Corbin said, “go deeper and minimize the damage and it’s something I didn’t do tonight.”

Diamondbacks starters had gone 12-0 in the 13-game streak.

Margot tripled in two during a six-run fourth and added a two-run single in the seventh. He also doubled, and leads NL rookies with 35 multihit games.

“He had good at-bats all day,” Padres manager Andy Green said. “The one was huge was that two-out RBI off of J.J. Hoover (in the seventh), when they brought him in to face Manny. Two outs, two strikes, those kind of at bats are game changing.”

Erick Aybar had three hits, including a triple, drove in a run and scored twice for San Diego.

Pinch-hitter Reymond Fuentes had a two-run homer in the Arizona fifth. J.D. Martinez hit his 35th home run of the season, including 19 with Arizona — four of them in a game earlier this week — connecting in the sixth.

GOLDY’S RETURN

Diamondbacks star Paul Goldschmidt was out for the fifth straight game, resting after noticing tightness in his right elbow.

But Lovullo said that, after going through batting and infield practice, Goldschmidt had been available to pinch hit. And Lovullo experts his star first baseman to be back in the lineup on Saturday night.

TRAINER’S ROOM

Diamondbacks: RH reliever Randall Delgado underwent an MRI after experiencing some discomfort after pitching on Wednesday. Lovullo said before the game he didn’t know the result. Delgado has been on the DL since July 16 with right elbow inflammation.

UP NEXT

Arizona sends RH Zack Godley (7-7, 3.21 ERA) to the mound and San Diego goes with RH Jhoulys Chacin (12-10, 3.96) in the second game of the three-game series.