PHILADELPHIA (AP) -- Nick Williams hit a walk-off, two-out double in the bottom of the 15th inning, scoring Aaron Altherr as Philadelphia came from behind to defeat the Miami Marlins 9-8 on Tuesday night.
Innings-wise, it was the longest game of the season for the Phillies and second-longest for the Marlins.
Williams had three hits and reached base five times in the marathon game. He has 47 RBIs since being called up the week before the All-Star break.
The Phillies celebrated with Williams, but thought they actually had a walk-off win in the bottom of the ninth on an RBI single by pinch-hitter Hyun-Soo Kim, but while the Phillies mobbed Kim at first base, ripping off his jersey and dousing him with water, Gatorade and sunflower seeds, the Marlins challenged the play at the plate.
After a lengthy review, it appeared catcher J.T. Realmuto's glove nicked the finger of a sliding Cesar Hernandez an instant before it touched the plate and the call on the field was overturned, and after the grounds crew had to clean up the mess around first base, Odubel Herrera struck out, sending the game to extra innings.
The Marlins bullpen coughed up a five-run lead, costing rookie starter Dillon Peters his first major league win. Peters pitched six solid innings allowing just two runs while striking out four.
Rhys Hoskins continued the torrid start to his major league career with two more home runs -- the first, a solo shot in the bottom of the seventh that kicked off the Phillies' comeback.
Then, after Marcell Ozuna put the Marlins ahead with his 33rd home run in the top of the 10th, Hoskins answered with a two-out blast to dead center field to tie the game.
Hoskins has 16 home runs in 112 major league at-bats since making his major league debut on Aug. 10. He already holds the Major League record for most home runs by a rookie who made his debut after Aug. 1.
Feeding off Hoskins' first homer, the Phillies plated three runs in the eighth inning on an RBI single by Alfaro and an RBI double by rookie J.P. Crawford, who reached base four times.
Giancarlo Stanton didn't have much of an impact at the plate, going 1 for 6 with a single, however, he did have three outfield assists -- including the play at the plate that nailed Hernandez in the bottom of the ninth. It was the second time this season that an outfielder had three assists in a game against the Phillies.
Realmuto had two RBI doubles, each scoring Justin Bour on plays at the plate when Phillies starting catcher Jorge Alfaro couldn't handle relay throws from shortstop Freddy Galvis.
Derek Dietrich hit his 15th homer of the season for the Marlins to start a four-run fifth inning off Phillies starter Nick Pivetta.
It was another rough outing for Pivetta who allowed seven runs and eight hits in five innings and saw his ERA climb to 6.75.
Dee Gordon had three hits for Miami extending his hitting streak to a career-best 15 games.
Phillies: C Andrew Knapp was activated from the 10-day DL Tuesday, but didn't see any action. He hasn't played since Aug. 3 with a broken right hand. The Phillies also transitioned RHP Zach Eflin to the 60-day DL (right shoulder strain) and called up RHP Victor Arano, who made his major league debut in relief.
The Marlins are unsure if their series this weekend against the Milwaukee Brewers, scheduled for Marlins Park, will take place at their home stadium. The stadium suffered minor roof damage from Hurricane Irma, but that's not the cause for concern. The state of the neighborhood surrounding the stadium is currently an issue, including some locations without electricity. That and the ability to staff the series with local police and firefighters could be problematic. The team expects a final decision Wednesday.
Marlins: RHP Dan Straily (9-8, 3.95) makes his fifth start of the season against Philadelphia. He is 3-1 against them but struggled his last time against them despite the win, allowing four runs and nine hits in five innings.
Phillies: RHP Aaron Nola (10-10, 3.71) faces his 2017 nemesis. The Marlins have clobbered Nola, who has lost each of his three starts against them with a 10.67 ERA. Take away his starts against Miami and Nola has a 2.96 ERA for the season.