PHILADELPHIA (AP) The Miami Marlins plan on contending in the National League and know they will need to win close games like Tuesday's over Philadelphia.
Christian Yelich homered and drove in the game-winning run with a single in the 10th inning to lead Miami to a 2-1 victory over the Phillies.
J.T. Realmuto added two hits for the Marlins, who won their third straight to remain one game ahead of the New York Mets for the second wild-card spot in the National League.
''These are the kind of the games you have to win,'' Marlins manager Don Mattingly said. ''As we keep doing what we've been doing, we're going to have a lot of these games that are close and hard to win.''
Tommy Joseph homered for Philadelphia, which lost its third straight.
Adeiny Hechavarria opened the 10th with a double off David Hernandez (1-3). After Hernandez walked Martin Prado to put runners on first and second with two outs, Phillies manager Pete Mackanin lifted Hernandez so left-hander Daniel Stumpf could face the left-handed Yelich.
Yelich put Miami in front by lacing Stumpf's 3-2 pitch to left field, easily scoring Hechavarria.
''(Yelich) was able to execute when he needed to,'' Mattingly said.
A.J. Ramos pitched a scoreless 10th for his 31st save in 32 opportunities.
Mike Dunn (2-1) tossed a 1-2-3 ninth to earn the victory.
The Marlins defeated Philadelphia in extra innings on Monday, 3-2 on Prado's 11th-inning homer.
''To be a good team you have to win those close ones, games like tonight and last night,'' Yelich said. ''We know we're going to have to continue to do that in the second half if we want to go where we think we're headed. It's a good start. You just have to build on it.''
Miami got on the board first when Yelich connected on an 0-2 pitch and drove it into the Marlins' bullpen in right-center. The 452-foot shot was Yelich's 13th homer of the season. He is hitting .369 in 20 career games at Citizens Bank Park.
Philadelphia answered in the bottom of the frame when Joseph launched his 13th homer into the third row of the upper deck in left field, a 430-foot drive.
Each team had their chance to go ahead in the late innings.
Philadelphia loaded the bases with two outs in the seventh, but reliever David Phelps struck out Peter Bourjos looking for the final out.
Realmuto reached second with two outs in the eighth, but Hector Neris fanned Yelich for the final out.
In a matchup of 24-year-olds, Miami starter Jose Urena and Philadelphia's Vince Velasquez pitched well although neither got a decision.
Velasquez gave up one run and three hits with five strikeouts and four walks in seven strong innings. The right-hander is 3-0 with a 1.88 ERA his last four starts.
''It was a good start from the get-go,'' Velasquez said. ''I was pretty happy with the outcome today.''
Urena was called up from Triple-A before the game to make his first start of the season and he didn't disappoint. The right-hander gave up one run and four hits with five strikeouts and one walk in 5 2/3 innings. Urena entered 1-1 with a 7.52 ERA in 16 relief appearances for Miami this season.
''He kept the ball down,'' Mattingly said.
Urena likely earned another start.
''We've been looking for that fifth guy to give us quality innings and get to our bullpen,'' Mattingly said. ''He's earned at least consideration for (another start). I don't know why we'd make a change right now.''
Miami's Ichiro Suzuki grounded out pinch-hitting in the eighth inning. Suzuki remained six hits shy of becoming the 30th player to reach 3,000 hits.
The Phillies finished with five hits, giving them a total of 10 hits in their last three games.
''We're in that hitting funk again,'' Mackanin said. ''We're just not swinging the bats. Too many bad at-bats. We're not grinding out at-bats, and we need to do that. Too many called third strikes with men in scoring position. That's a pet peeve of mine, and we're going to address that. We just need to hit.''
Mackanin said he was going to have a team meeting to address the Phillies batters approach at the plate.
Phillies: 3B Maikel Franco went headfirst into the turf while making a diving catch on Don Kelly's bunt attempt in the 10th. Franco was seen by the trainer but remained in the game.
Miami LHP Wei-Yin Chen (5-3, 4.90) faces Phillies RHP Jeremy Hellickson (6-7, 4.03) on Wednesday night in the third game of the four-game series.