After some heavy lifting by a couple new guys and a massive dropped opportunity by a new guy, Manny Machado was there to make sure a wild night ended right for the Padres.
Machado's walk-off three-run homer in the ninth inning gave the Padres a 7-4 victory, their first win in six games.
Juan Soto's fourth-inning homer stopped a scoring drought at 26 innings, and his sixth-inning double helped the Padres take a lead that it seemed would hold up before Josh Hader allowed three runs in the ninth inning on three walks, a single, a hit batter and a sacrifice fly.
Hader was pulled with two outs and the bases loaded, and Tim Hill struck out Joc Pederson and got the win.
With one out in the bottom of the ninth, Jurickson Profar hit a single up the middle. Soto then reached on catcher's interference to bring up Machado.
Machado, who carried the Padres early in the season but has struggled lately, lined a 2-1 slider from Tyler Rodgers to the seats beyond left field.
Soto, who came to the Padres with Josh Bell from the Nationals in a trade on Aug. 2, the same day Brandon Drury was acquired from the Reds, tied the game 1-1 with his first Padres homer, a towering drive that sailed a projected 395 feet and stayed just inside the right-field foul pole.
He led off the sixth inning with a double down the right-field line, went to third on Machado's single to left field and scored on Bell's single up the middle.
That ended Giants starter Alex Cobb's night, and Drury grounded into a fielder's choice against Yunior Marte that eliminated Bell at second but moved Machado to third. Jake Cronenworth's sacrifice fly drove in Machado.
Doubles by Bell and Ha-Seong Kim put the Padres up 4-1 in the eighth.
The only run Joe Musgrove allowed came on LaMonte Wade Jr.'s home run with two outs in the first inning. Musgrove spread five hits over the next six innings. Adrian Morejón and Luis Garcia worked the eighth.
Hader, acquired from the Brewers, came in looking for his major league-leading 30th save and first with the Padres.
____©2022 The San Diego Union-Tribune. Visit sandiegouniontribune.com. Distributed by Tribune Content Agency, LLC.