MIAMI (AP) -- Christian Yelich stepped to the plate 0 for 4 in the game and 0-since-the-minors when batting with a chance for a walkoff win.
This time he came through. The Miami outfielder hit a two-out, bases-loaded RBI single in the ninth inning Thursday to give the Marlins a 4-3 victory over the Philadelphia Phillies.
Yelich said the walkoff hit was his first since Single-A. As a reward he was mobbed by his teammates after rounding first base.
''You know you're probably going to get beat up a little bit out there, but it's an awesome feeling,'' he said. ''I got horse-collared for a second, but that's all right. I'll take it. I'm glad I could win that one.''
The Marlins won despite squandering a 3-0 eighth-inning lead. They improved to 19-6 at home, best in majors, and have scored a game-ending run in four of their past six victories at Marlins Park.
That gives them five walkoff wins this year, which is tied with the Pittsburgh Pirates for the most in the majors, according to STATS.
''Nobody wants to play extra innings,'' manager Mike Redmond said. ''We wanted to get that thing done with and go out and have a nice meal.''
Miami's Henderson Alvarez threw seven shutout innings, while Cole Hamels allowed three runs in seven innings. The Phillies lost two of three in the series and are 20-24 going into an 11-game homestand starting Friday.
''We're so close for that sort of explosion to happen and for everything to come together,'' Hamels said. ''It's a matter of time before it will happen, but I know personally it should happen soon.''
Philadelphia's Marlon Byrd tied it in the eighth with a two-run homer, his sixth. Miami's Marcell Ozuna hit a two-run homer, giving him two homers and seven RBIs in the past two games, and he threw out a runner at third from center field.
Ozuna also started the ninth-inning rally. He singled with one out off Jake Diekman (2-2), then took second on a two-out single by Jeff Mathis. Pinch hitter Reid Johnson reached on an infield single that Diekman bobbled, sending Ozuna to third and bringing Yelich to the plate.
''I'm thinking, 'Don't leave me here,''' Ozuna said. ''He did a good job.''
Yelich grounded a 1-1 fastball up the middle.
''It was fitting to get Yellie up there at the end,'' Redmond said. ''He has been in a couple of sits where he has had a chance to get a big hit and hasn't come up with one. I was sitting there thinking, 'This would be a perfect day for him to get a big hit,' and sure enough he did.''
Marlins closer Steve Cishek (4-1) struck out two with a runner at second to end the ninth. The Phillies went 1 for 7 with runners in scoring position, with Byrd's homer the lone hit.
With the Phillies trailing 1-0, manager Ryne Sandberg let Hamels bat for himself in the seventh. He then gave up a single and Ozuna's eighth homer on an 0-2 pitch to start the bottom of the seventh.
Ozuna had been batting .113 in May before his breakout in the past two games.
''When he gets hot, he's as good as anybody,'' Redmond said.
Jimmy Rollins singled in the third to take over sole possession of second place on the Phillies' hit list with 2,218. He trails on Mike Schmidt, who had 2,234.
Notes: RHP David Buchanan will be recalled from Triple-A Lehigh Valley to make his major-league debut Saturday for the Phillies against the Los Angeles Dodgers. Buchanan will start in place of LHP Cliff Lee, who is on the disabled list with a mild elbow strain. ... RHP Jonathan Pettibone, who has been on the Triple-A disabled list, received a cortisone injection and will try to pitch with a small labrum tear, the Phillies said. He's expected to resume throwing next week. ... Marlins INF Jeff Baker left the game in the ninth inning with a bruised right shoulder following a collision at first base. His status is day to day. ... The Marlins transferred INF Rafael Furcal (groin) to the 60-day disabled list retroactive to March 21. They selected the contract of RHP Chris Hatcher from Triple-A New Orleans. ... The Marlins lead the majors with 54 infield hits. ... RHP Tom Koehler (4-3, 2.25) is scheduled to pitch against RHP Marco Estrada (3-2, 3.64) when the Marlins open a weekend series at home Friday against Milwaukee. ... The Phillies return home Friday to face the Dodgers, with RHP Roberto Hernandez (2-1, 3.98) scheduled to pitch against LHP Clayton Kershaw (2-1, 4.43).