SAN DIEGO -- The Padres' postseason hopes received a jolt of electricity Monday night as Jackson Merrill's 19th home run of the season and Mason Miller's 30th save secured a 3-2 comeback win over the Milwaukee Brewers at Petco Park.

With the scoreboard reading 2-1 in favor of the visiting Brewers in the bottom of the seventh inning, Ty France delivered a one-out single that set the stage. Merrill, who has been scorching since the All-Star break with nine homers, jumped on a first-pitch changeup from Logan Henderson. The 83 mph offering never had a chance. Merrill drove it deep to center field, clearing the wall for a two-run blast that flipped the lead to 3-2.

Henderson, who entered the night riding a six-decision winning streak over seven starts, had been in control until that moment. Over 6 1/3 innings, the Brewers' right-hander allowed three runs and five hits while striking out seven. But Merrill's swing broke the spell, handing Henderson his first loss since May.

San Diego's bullpen took over from there. Yuki Matsui (3-1) pitched a scoreless seventh inning, keeping the one-run lead intact. Miller then entered for the ninth, needing just a clean inning to notch his NL-leading 30th save. He got it, but not without a bit of drama. With two outs, pinch-runner Brandon Lockridge — who had replaced a batter on base — took off for second base. Padres catcher Freddy Fermin's throw was on the money, and Lockridge was tagged out to end the game.

Earlier, the Brewers struck first when Christian Yelich crushed a solo homer to left field in the second inning off Padres starter Casey Mize. That blast, part of a two-run frame, put Milwaukee ahead 2-0. Mize worked six innings, allowing two runs and five hits while striking out six. He avoided further damage, but the Padres offense remained quiet until the bottom of the second, when France answered with a solo home run of his own to left field, cutting the deficit to 2-1.

For a while, Henderson stifled any further San Diego rallies. The Padres managed only scattered baserunners through the middle innings. But Merrill's late heroics changed the narrative.

The win keeps the Padres within one game of the final National League playoff spot. They have won 13 of their last 17 games, showing resilience as the calendar turns toward September. The Brewers, despite the loss, still boast the best record in the majors and lead the NL Central by five games over the Chicago Cubs.

Both teams return to the field Tuesday night for the second game of this three-game series. Milwaukee will send left-hander Kyle Harrison (9-2, 2.84 ERA) to the mound, while the Padres counter with right-hander Walker Buehler (6-5, 5.07 ERA).