Gio Gonzalez dropped his ERA to 2.39, which is third in the majors behind Clayton Kershaw and Max Scherzer. (Kent Horner/Getty Images)

The Washington Nationals arrived in this Southern California paradise Wednesday evening teetering. Their outfield was decimated. Their infield and pitching staff weren’t without their plights. Manager Dusty Baker found himself managing a roster he had never envisioned, and the hits kept coming over their four-game series against the San Diego Padres.

On Thursday, the Nationals placed Ryan Madson on the disabled list and mustered two runs. On Friday, ace Max Scherzer was scratched a couple of hours before first pitch and put on the DL. On Saturday, Daniel Murphy was a late scratch, which left a starting lineup with only three regulars — and two rookies at the top of the order who started the season in Class AA.

And yet by the end of the Nationals’ 4-1 victory at Petco Park on Sunday, they had taken three of four games from the plucky San Diego Padres behind their pitching staff, showing that, in their diminished state, they still are better than most of the competition they will encounter down the stretch of the regular season.

Pitching, as it did all weekend, fueled the Nationals on Sunday as Gio Gonzalez added another outstanding performance to his splendid campaign. The left-hander allowed one unearned run on five hits over 6⅔ innings. He struck out eight, walked one and, with the Nationals’ bullpen down to four available relievers, threw a season-high 121 pitches.

“That was big,” Baker said. “He took one for the team. We needed him to go as deep as he did. We were thinking about [taking him out] around the fifth and the sixth, but we needed some innings. We couldn’t fill those innings. So that was an outstanding performance for Gio.”

Joe Blanton , Brandon Kintzler and Sean Doolittle then combined to throw 2hitless innings to complete the bullpen’s series-long dominance. Including Matt Grace ’s spot start in Scherzer’s place Friday, Washington’s relief corps allowed two runs on five hits across 15innings in the four games.

“The pitching staff did an unbelievable job,” Murphy said. “I think they’re the reason why we were able to win the series.”

Offensively on Sunday, the Nationals (74-48) squandered the opportunities Dinelson Lamet’s extraordinary wildness afforded them. They left nine runners on base, went 2 for 11 with runners in scoring position and collected five hits. But they generated enough behind Wilmer Difo’s two doubles, a rested Murphy’s two RBI and a clutch double from Adam Lind to provide the support Gonzalez merited.

Gonzalez is enjoying his best season since 2012 because he’s inducing more weak contact than he ever has in a Nationals uniform. Entering Sunday, hitters were making soft contact 21.6 percent of the time against Gonzalez, up 3.5 percent from last season and his highest mark since 2011, when he was with the Oakland Athletics.

Meanwhile, his hard-hit contact rate was down 3.6 percent. His stuff doesn’t generate the whiffs it once did, and he has adjusted to become one of baseball’s best pitchers. The blueprint has produced a more efficient Gonzalez, whose inefficiency in recent years generated inconsistency and ire. But the blueprint also requires some luck and strong defense for optimal results. Early against the Padres (55-69), Gonzalez was the beneficiary of neither.

Two singles — including a broken-bat hit — and Difo’s throwing error cost him a run in a 32-pitch first inning. In the second inning, he surrendered a bloop single. Then Alejandro De Aza , making his second start for the Nationals and first in right field, lost a routine flyball in the sun and had it ricochet off his glove to put runners on second and third. But Gonzalez again regrouped and induced another flyball to De Aza, who battled the sun to redeem himself.

Meanwhile, Lamet found success via a completely different strategy. He was wild but effectively so, wiggling out of self-created trouble when he bottled his nasty stuff. Through two innings, he issued three walks, struck out three, induced two groundouts to first base and allowed zero runs.

The Nationals broke through, fittingly, when Gonzalez drew a walk to lead off the third inning. Difo then laced his first double to move Gonzalez to third base. The pitcher raced home on Murphy’s sacrifice fly to tie the game. But that was all the Nationals could muster. By the end of the inning, Lamet had thrown 36 strikes to 34 balls, walked six, struck out five and surrendered just the one run. He finished with eight strikeouts to six walks in 4⅔ innings.

Gonzalez then settled in with consecutive 1-2-3 innings before a 19-pitch fifth inning pushed him to 97 pitches, jeopardizing his 18-start streak of pitching into the sixth. But the Nationals stuck with him, letting Gonzalez hit for himself in the sixth so he could pitch the bottom of the frame.

Gonzalez responded with a 1-2-3, eight-pitch inning and struck out the first two batters in the seventh before Manuel Margot singled, prompting Baker to surface from the dugout. The lefty walked off the mound with a 2.39 ERA, the third best in baseball. His .120 opponents’ batting average with runners in scoring position is first in the majors, and his 20 quality starts (six-plus innings while allowing three or fewer runs) are tied for first.

“Just tried to stick with the same game plan,” Gonzalez said. “Was just constantly trying to pound the strike zone, and they were fouling off some pitches, just working the count. . . . As soon as Matt Wieters and I settled in, we tried to [generate] more contact, more groundballs, some routine flyballs.”

Blanton relieved Gonzalez and needed three pitches to strike out Jabari Blash to end the seventh. Kintzler got three quick outs — inducing a double play after an error — in the eighth inning, and Doolittle struck out the three he faced in the ninth for his 11th save in 11 opportunities as a National.

“We’re finding ways to win games,” Baker said.