San Diego scored twice in the second inning, five more times in the third and then spent the rest of Friday night protecting what remained. The Padres beat the San Francisco Giants 7-5 at Oracle Park for their fifth consecutive victory, keeping a half-game lead over Arizona in the National League Wild Card race.

The early damage came from across the lineup. Jackson Merrill finished with three hits, while Dustin Harris and Freddy Fermin collected two apiece. Harris tripled and reached base three times. Seven of San Diego's 12 hits went for extra bases, production that arrived even with Ty France on the paternity list, Manny Machado hitless and Fernando Tatis Jr. quiet until an eighth-inning triple.

A 7-1 lead after three innings looked comfortable. It was not. Padres starter Robbie Ray walked four in five innings, and those free passes converged in the fifth when Rafael Devers hit a grand slam. Ray allowed five runs in his first start at Oracle Park since San Francisco traded him to San Diego at the deadline, but the offense had built enough margin for him to earn the 100th win of his major-league career.

The bullpen carried that margin one inning at a time. Yuki Matsui, Adrian Morejon and Bradgley Rodriguez combined to allow one hit from the sixth through the eighth. Their work kept the Giants from adding to Devers' swing and handed Mason Miller a two-run lead in the ninth rather than a tie game.

Miller retired his first two hitters, then created one last jam. He walked pinch-hitter Nate Furman, allowed a bunt single to Jonah Cox and walked Devers, loading the bases and putting the tying run in scoring position. Bryce Eldridge represented the winning run. Miller answered with a 102.8 mph fastball at the knees for strike three, ending the game on the matchup San Francisco had forced.

The sequence exposed both sides of the win. San Diego generated enough offense without relying on its most established hitters, a useful sign for a club trying to sustain a September run. It also needed all four of its highest-leverage relievers after once leading by six, limiting the rest that an early outburst might normally buy.

Harris supplied the clearest roster-development story. Released earlier in the summer after time in the Houston and Chicago White Sox organizations, he signed a minor-league deal with San Diego in July and earned a promotion by continuing to hit. After Friday, MLB.com reported him at .367 with an .873 OPS through 13 games since the call-up. His single, triple and walk made his contribution more than one decisive swing.

Ray's line remains the harder part of the trade return to evaluate. MLB.com put his ERA at 5.35 through seven Padres starts after Friday. He had allowed five runs only once in 11 starts at Oracle Park as a Giant this season, then matched that total in five innings as a visitor. Win No. 100 recorded the outcome; four walks and one grand slam described the route.

The Padres left Oracle Park with the result they needed and the workload they would have preferred to avoid. Their fifth straight win kept the Wild Card position intact and moved them within 2 1/2 games of Philadelphia and Chicago in the league's seeding. The next test is immediate: convert another early lead without requiring every late-inning arm to preserve it.