SAN DIEGO – Trailing early and losing their starting pitcher to an injury, the San Diego Padres showed the kind of grind to upend the negative June trends and top the Washington Nationals 4-3 on Tuesday night at Petco Park.

Martín Maldonado hit a game-tying home run in the fifth inning, and Jose Iglesias drove in the eventual game-winning run in the sixth after the Padres (43-36) worked three straight walks to start the inning off Nationals (33-47) starter Trevor Williams and reliever Cole Henry. Then the bullpen made it stand up.

“It’s not just the back end of the bullpen, it’s the bullpen in total, all eight guys and we’ve had a bit of interchangeable parts,” said manager Mike Shildt. “We pass the ball around, guys are carrying a little bit more of the weight than maybe we would like in some instances, but we’ve also been really efficient.”

Starter Ryan Bergert left the game after giving up two runs and then taking a 103 MPH liner off his right arm and body to lead off the fourth inning and left the game. According to Shidlt postgame, everything “looks to be negative” imaging-wise.

The relievers had given up 29 runs in 47 innings since the beginning of the Dodgers series on June 9. On this night it looked like the top 10 unit it has been over the life of the season, as a quartet of pitchers combined to allow just two hits and retired the final 10 Nationals.

Adrian Morejon allowed his inherited runner to score in the fourth, but allowed just the one hit with a strikeout over two innings. Then Jason Adam yielded a lone hit over 1 ⅔ innings with a K to earn his sixth win, Jeremiah Estrada pitched a clean 1 ⅔ innings with two strikeouts and Robert Suarez recorded his 22nd save with a 1-2-3 ninth and a punchout.

“I feel like we pass the ball around, guys are carrying a little bit more of the weight that we would like, maybe in some instances, but we’ve also been really efficient,” Shildt said. “Innings are relative to workload…but it’s also the pitches they throw, we put them in pretty good spots when we have the ability to do that. But they do the work and we take them to a place and don’t push them beyond anything that’s uncomfortable or feel is uncomfortable for them.”

It was San Diego’s second 1-run win in three days after losing four straight single score contests and taking seven of their 12 losses by one in June. The win is the Friars’ 16th by 1-run for the season, trailing only the Giants (19) in the National League and Majors.

“Those guys out there (the bullpen) have been the core of this team, that’s why we have so many comeback wins in the year,” Maldonado said.

After giving up the first three runs of the game, the Padres got production from the bottom of the order to turn the game around.

San Diego scratched across a pair in the fourth inning, started by the pair of streaking batters. First Luis Arraez had his second single of the game, he has hits in 11 in a row, then Gavin Sheets hit a ground rule double to extend his on-base streak to 15 games.

Xander Bogaerts brought a run in with a ground out to third, then Jake Cronenworth doubled to plate his 7th RBI in the last 10 games. Maldonado tied it leading off the fifth by ambushing a first-pitch fastball over the heart of the plate for his third home run of the season to tie it.

“(I was) looking for a good pitch to hit — batting nine you know you have Fernando Tatis behind you, the top of the lineup coming up, you try to get a hit and don’t want to miss it,” Maldonado said.

Bergert, making his first start at Petco Park and first appearance since pitching an inning of relief on April 26, worked through traffic in his three innings.

In the first inning he was able to strand CJ Abrams after a leadoff double and a one out walk.

Then in the second Bergert allowed a one-out single to Daylen Lile followed by a double to Riley Adams. Jacob Young pushed a sacrifice squeeze to the first base line that scored Lile when he beat the shovel flip home. Walks to Abrams loaded the bases then James Wood brought in a run, but Bergert got a strikeout and a flyout to end the threat.

Trailing 2-0, Bergert allowed a one-out single in the third. He finished with five hits allowed, three runs, four strikeouts and three walks in his three innings of work before the injury substitution.

Williams took his ninth loss of the season for Washington, going five innings with seven hits, four runs, three strikeouts and two walks. Henry also had a walk, and allowed the fielder’s choice by Iglesias that plated the decisive run.

The decisive game of the series will feature Nick Pivetta (7-2, 3.64 ERA) taking the hill for the Padres against former San Diego draft pick MacKenzie Gore (3-7, 3.19 ERA) for the Nationals, with first pitch slated for 1:10 p.m. at Petco Park.

This story was updated at 10:10 p.m.