MIAMI (AP) The Phillies' offense waited a while to show up Saturday night. It came alive at the right time.
Aaron Altherr and Darin Ruf hit back-to-back solo home runs in the top of the ninth inning to lift Philadelphia to a 4-2 victory over the Miami Marlins.
''You want to come up in a spot like that in the ninth inning,'' Altherr said. ''It was a nice comeback there at the end. We just needed a couple of hits in a row and get some runs scored and we're right back in it. I'm just glad I was able to be a part of that.''
Six of the Phillies' nine hits and all four runs came after the seventh inning. The Phillies came into the game 4-68 on the season when trailing after seven innings.
''Fortunately for us, we didn't give up and came right after them and we were able to get the win,'' interim manager Pete Mackanin said.
The Phillies scored two runs in the eighth, sparked by Darnell Sweeney's first major league hit, a pinch-hit, solo homer that brought Philadelphia within 2-1.
''Having my parents and my brothers and sisters here was definitely a great feeling to be able to do that in front of them,'' Sweeney said. ''It's a dream and a storybook ending. It was just awesome.''
Andres Blanco's RBI double made it 2-2.
Altherr broke the tie with a homer off A.J. Ramos (1-4), who has given up four of his six home runs this season to the Phillies. Ruf followed with a homer on the next pitch to give the Phillies back-to-back home runs for the first time this season.
''The home runs were fun to see,'' Mackanin said.
Elvis Araujo (2-1) got the final out of the eighth inning to earn the win. Ken Giles pitched a perfect ninth for his ninth save in 12 chances.
Marlins starter Justin Nicolino was in complete control with a 2-0 lead and two outs in the eighth. Sweeney, who was 3 for 7 against Nicolino in Triple-A this year, made it 2-1 and Cesar Hernandez followed with a single ending Nicolino's night.
''I left that cutter in the middle of the plate for Sweeney,'' Nicolino said. ''... He put a good swing on it and just hit a bad pitch.''
Bryan Morris came on in relief and allowed the game-tying double to Blanco on a 1-2 offering.
''I had him where I wanted him,'' Morris said. ''I had a game plan and obviously I didn't execute it. I had an advantage count for myself and obviously I screwed that one up.''
Nicolino pitched a career-high 7 2-3 innings allowing two runs and five hits. He struck out four and walked one.
''It was a frustrating loss to waste that quality of a start by the kid,'' Marlins manager Dan Jennings said. ''Nico pitched a tremendous ball game.''
The Marlins had a chance to go ahead in the bottom of the eighth when Martin Prado doubled and Justin Bour walked, but pinch-hitter Casey McGehee grounded out to end the inning.
Aaron Harang walked three batters in the third inning and the Marlins took advantage of the bases-loaded situation as Derek Dietrich hit a two-run double to center field.
Harang settled down and retired the final 13 batters he faced. He allowed two runs and two hits in seven innings.
''I kind of figured some things out after that (third) inning,'' Harang said. ''I felt like I was rushing a little bit. I just told myself to get things under control.''
Marlins: RHP Jarred Cosart (ear) had a rehab start with the GCL Marlins on Saturday throwing four scoreless innings. ''A very promising report so good to hear,'' Jennings said. The plan is for Cosart to have two more rehab starts before returning to the big league club.
Phillies: RHP Aaron Nola (3-1, 4.41 ERA) will take the mound in Sunday's series finale. Nola has won his last three decisions over five starts.
Marlins: LHP Adam Conley (1-0, 5.82) will be looking to get through five innings for the first time in three starts.