PHILADELPHIA (AP) Starlin Castro nearly knocked himself out of the game before he knocked one out of the park.
''I just wanted an opportunity that inning,'' Castro said. ''That guy (Hector Neris) is really good. I kept a good approach, looked for a fastball I can drive.''
Marlins starter Caleb Smith gave up one run and three hits, striking out eight in six innings and five relievers pitched four scoreless innings.
''Every start I'm a little more comfortable,'' Smith said after lowering his ERA to 2.17.
Phillies left fielder Nick Williams made a perfect one-hop throw to the plate to prevent Miguel Rojas from scoring from second on Isaac Galloway's single to end the top of the ninth.
But Castro connected off Neris (0-1) after Neil Walker lined a double off the left-field wall.
''We had people on base every inning,'' Castro said. ''Walker had really good at-bats all night.''
Tayron Guerrero (1-0) pitched a perfect ninth for the win. Sergio Romo finished for his third save in four tries.
''It was a really nice team win,'' Marlins manager Don Mattingly said. ''It's a black and blue division.''
Phillies ace Aaron Nola allowed one run and seven hits in 6 2/3 innings in his best start since the season opener. Nola exited with runners on first and third, but Adam Morgan retired pinch-hitter Galloway on a fly to center.
''Really good sign for Nola,'' Phillies manager Gabe Kapler said. ''Steps in the right direction. Still not his best. Still not his best curveball. But certainly moving in the right direction and looking more and more like himself.''
Miami has won four of six, yet is tied with Kansas City for the worst record in the majors at 8-17.
The Phillies have lost six of eight after an 11-6 start.
Sean Rodriguez hit a solo homer to give the Phillies a 1-0 lead in the second.
Martin Prado's RBI single in the third tied it at 1-1. Curtis Granderson was caught in a rundown trying to steal home to end the inning after Prado broke from first.
The Phillies had a chance to take the lead in the sixth when Andrew McCutchen led off with a double and moved to third on a fly out. But Bryce Harper fouled out and Rhys Hoskins flied out.
GRIND IT OUT
J.T. Realmuto fouled off nine straight 3-2 pitches in the first before Smith struck him out on the 16th pitch of the at-bat. Phillies fans gave Realmuto a partial standing ovation for his effort.
FEELING THE PHILS
Jorge Alfaro was 2 for 5 and has multiple hits in each of his three games against the Phillies this season, batting .500 (6 for 12). Alfaro was traded to Miami in the deal that brought Realmuto to Philadelphia.
Marlins: OF/1B Garrett Cooper (left calf strain) was the designated hitter in an extended spring training game Thursday. He could start a rehab assignment on Friday, if he's cleared. ... RHP Riley Ferrell (right biceps tendinitis) threw a bullpen session Thursday.
Phillies: OF Roman Quinn was placed on the 10-day injury list with a right groin strain. OF Dylan Cozens was recalled from Triple-A Lehigh Valley to take his spot.
RHP Jose Urena (1-3, 5.74 ERA) starts for the Marlins and RHP Jerad Eickhoff (0-1, 3.60) goes for the Phillies. Urena is 3-4 in 11 starts vs. Philadelphia. Eickhoff is 2-3 in six starts vs. Miami.
More AP MLB: https://apnews.com/MLB and https://twitter.com/AP-Sports
Copyright 2019 by AP. Any commercial use or distribution without the express written consent of AP is strictly prohibited.