For want of a quicker third out in any of the first three innings, the Padres might have won Tuesday night.

As it was, they fought back from an early four-run deficit before falling short in a 4-3 loss to the Phillies.

The combination of Randy Vásquez yielding solo home runs with two outs in each of the first three innings and the Padres’ ailing offense being unable to do much against previously struggling Phillies starter Aaron Nola was too much to avoid a third consecutive loss.

Manny Machado did hit a two-run homer against Nola in the fourth inning that got the Padres to 4-2. And Ramón Laureano’s solo homer leading off the eighth inning against Brad Keller cut the deficit to one.

But Machado failed to drive in a runner from second in the eighth inning, and the Padres went down in order in the ninth.

A pair of infield singles were the Padres’ only other hits besides Machado’s homer in six innings against Nola, who had allowed 13 runs in 13⅓ innings in his previous three starts and had not gotten past the fifth inning in any of them.

But facing the Padres has long been a comfortable thing for Nola, who has a 2.78 ERA in six starts against them since 2021.

The Padres only failed twice with a runner in scoring position Tuesday, because they only had two at-bats with a runner in scoring position.

They are now hitless in their past 27 at-bats in that circumstance dating back to the ninth inning of Friday’s game against the Athletics.

The Phillies, who came into the series batting .161 over their previous six games, have not entirely heated up.

But they have powered up, hitting five home runs in two games.

All of the Phillies’ runs in Monday’s 3-0 victory were driven in by a pair of homers, and three solo home runs gave them a 3-0 lead on Tuesday.

Vásquez was perfect against the first two batters in each of the first three innings. But after going two up, two down, the Phillies went out of the ballpark in all three innings.

It was Bryce Harper in the first inning, J.T. Realmuto in the second and Trea Turner in the third.

The Phillies added a run on a walk and two singles before Vásquez ended the inning.

He then almost kept the pattern going in the fourth inning, returning the first two batters before Edmundo Sosa drove a ball a projected 403 feet to center field where Merrill leaped to make a catch at the top of the wall for the third out.

The Padres’ first hit off Nola came with two outs in the bottom of the fourth, when a grounder up the middle by Gavin Sheets bounced off Turner’s glove.

Machado lined Nola’s next pitch just beyond the wall in left field.

Nola retired the next six batters before Xander Bogaerts beat out a dribbled grounder to the left side.

Bogaerts stole second base on the first pitch to Sheets, but two pitches later the inning was over on Nola’s fifth strikeout of the night.

Phillies manager Don Mattingly decided Nola’s night was over after 80 pitches.

Machado led off the seventh with a walk against Orion Kerkering before three strikeouts ended the inning.

Wandy Peralta followed 1⅓ scoreless innings by Bradgley Rodriguez, who had relieved Vásquez with two outs in the sixth, with a scoreless eighth.

A one-out single by Fernando Tatis Jr. and two-out walk by Sheets brought up Machado with a chance for a hit to tie the game, but he grounded out softly to third.

Adrian Morejón worked a scoreless top of the ninth before Jhoan Duran mowed through Miguel Andujar, Jackson Merrill and Ty France to end the game.