Juan Soto went 2 for 3 with two RBIs, Xander Bogaerts and Matt Carpenter led a five-round rally in the ninth for the San Diego Padres who beat the Miami Marlins 9-4.
Carpenter, who entered hitting .105 (6-for-57 in May), had three RBIs.
Bryan De La Cruz hit a two-run homer for the Marlins (28-27), who returned home after a three-game sweep of the Los Angeles Angels.
National League Cy Young Award winner Sandy Alcantara failed to hold a 4-2 lead and is 1-5 in his last nine starts. He allowed four runs, five hits in 6 1/3 innings while walking five, one shy of his career high. His ERA went up to 4.93.
Gary Sanchez went 1 for 4 with an infield single in his Padres debut, a day after the struggling two-time All-Star was claimed by the New York Mets.
With the score 4-4, Fernando Tatis Jr. walked Dylan Floro (3-3) leading off the ninth. Tatis stole second, Soto was intentionally walked and Bogaerts hit an 0-2 fastball chest high to center field.
Rougned Odor, with the infield, hit a chopper that shortstop Jon Berti threw wide to the third-base side of the plate on an error. Carpenter hit a two-run double, giving him 24 RBI.
Floro was pulled and still angry about the four-ball call to Tatis on a sinker near the low inside corner, said something as he walked to the dugout that caused home plate umpire Jordan Baker to throw him out. Ha-Seong Kim followed with a sacrifice fly off Bryan Hoeing.
Nick Martinez (3-2) pitched a scoreless eighth inning around a single and a walk, retiring Jorge Soler on a double play groundout late in the inning.
Miami went 2-for-10 with runners in scoring position, while the Padres went 6-for-16.
San Diego trailed 4-2 before Tatis hit an RBI single in the seventh and Soto greeted Tanner Scott with a run-scoring single.
Padres starter Ryan Weathers allowed three runs, seven hits and three walks in four innings.