Randy Vásquez continued a run of excellent starting pitching, and the Padres continued their uninterrupted two-week stretch of on-and-off offense with an “on” night.

It was the kind of synergy that felt much needed at the start of a six-game homestand, coming off a series loss in New York and in a tight playoff race.

Vásquez allowed both of his runs and both of his hits in one inning and finished seven for the second time this season, and a four-run outburst in the fifth inning lifted the Padres to a 6-2 victory over the Twins on Friday night at Petco Park.

The Twins arrived in San Diego two games below .500 but, like the Padres, in possession of the final playoff spot in their league.

The Padres (69-60) held onto the sixth seed in the National League, a game up on the Diamondbacks, who also won Friday. The Twins (63-66) fell a half-game behind the Rangers in the American League.

The seven innings from Vásquez made him the fifth straight member of the Padres starting rotation to turn in a quality start. Before this run, the Padres had not gotten three quality starts in a row this season.

“I think that’s the mentality of each one of us is to go out there and have a good quality start,” Vásquez said. “And that’s kind of how we’re pushing each other, making sure that we’re all doing those quality starts at the time.”

Friday was also the sixth time in 12 games the Padres scored at least five runs. Beginning with their 3-2 victory over the Astros on Aug. 8, the Padres have scored four or fewer runs every other game and five or more in all the others.  The contrast has actually been greater than that.

Their game-by-game scoring in that span: 3, 7, 3, 11, 4, 7, 1, 5, 1, 5, 2, 6.

“I think it’s part of offense,” Padres manager Craig Stammen said. “It’s just not consistent like defense and pitching (are).”

The Padres do lead the major leagues in batting average, on-base percentage and slugging percentage since July 19. And they looked like that team Friday.

Ty France got the Padres started in Friday’s first inning with a two-run homer to the second deck of seats beyond left field against the team for which he played the first four months of last season.

Vásquez retired nine straight batters to begin the game. His first pitch was a strike to six of those batters, just one batter saw three balls, and he was never behind 2-0.

Then that incredible precision vanished for an inning — and just an inning.

Luke Keaschall was the first Twins batter to get ahead 2-0 against Vásquez and led off the fourth inning with a hit.

A fielder’s choice erased Keaschall, but it would have been a double play had Manny Machado’s throw to second base not been wide and forced Jake Cronenworth to stretch out to catch it. Vásquez then had a cutter run in and hit Josh Bell’s pant leg before getting an out and leaving a cutter over the middle that Kody Clemens lined off the right field well to tie the game.

Twins starter Connor Prielipp, a rookie left-hander, escaped a bit of trouble the next two innings when Machado grounded into an inning-ending double play with runners on first and third in the fourth inning and Xander Bogaerts grounded into a double play to end the fifth.

But while Vásquez retired the final 10 batters he faced, Prielipp got run over by an avalanche of singles in the fifth inning.

The first of those came when Austin Hays beat out a dribbler to third base. And after a one-out walk, Fernando Tatis Jr., Luis Rengifo and Machado singled in succession with each of those hits driving in a run. The final run came on France’s sacrifice fly.

The inning was not the norm lately for the Padres, who have been highly dependent on home runs lately and have had relative difficulty with runners in scoring position.

“It’s just kind of the identity of our offense and what we’re trying to be and what we’re trying to accomplish,” France said. “A lot of unselfish at-bats, just passing the torch. Good things came from it.”