Adeiny Hechavarria drove in three runs, including the decisive one in the eighth inning, and the Marlins held off the Phillies, 3-2, at Marlins Park.
By taking two of three, Miami picked up its first home series victory since winning a three-game set against the Pirates from July 26-28.
"Every win for us is huge," manager Mike Redmond said. "Like I've been saying, these guys are still battling, they're still fighting. They're going to play this thing to the end. We've got three games left, and we're going to try to win a series against the Tigers."
After an off-day on Thursday, the Marlins will play host to Detroit in their final series, beginning Friday.
Miami improved to 21-35 in one-run games, with the final three outs being locked down by closer Steve Cishek.
Cishek worked around a Freddy Galvis bunt single to open the ninth, striking out Roger Bernadina and then Jimmy Rollins to end it. It was a benchmark moment for the 27-year-old Cishek, who earned his team-record 28th straight save. Todd Jones saved 27 in a row in 2005.
Cishek's streak is the longest active run in the Majors, and the right-hander has 33 saves on the year.
"I really just tried not to think about it, but in my mind, it was in the back of my head," Cishek said.
The Marlins limited the Phillies to four runs in the series.
"This series, we definitely had problems scoring runs," said Philadelphia manager Ryne Sandberg. "I've been told there's a little bit of a history of that. We had 10 hits and the two runs. We have a power shortage right now with extra-base hits and home runs, but we had guys on base."
Miami took the lead for good when Hechavarria was credited with his third RBI on a play at the plate the Phillies couldn't convert.
Justin Ruggiano drew a one-out walk off reliever Ethan Martin, and he moved to third on Placido Polanco's single to right. With the infield in, Hechavarria chopped a grounder that drifted Rollins to his left. The veteran shortstop threw home, but catcher Carlos Ruiz couldn't catch the throw. The ball kicked away and Ruggiano scored. Rollins was tagged with his 11th error of the season, but Hechavarria was still awarded an RBI on the fielder's choice.
"I tried to wait on a good pitch to hit back up the middle," Hechavarria said. "The pitch was coming hard, more than 95 mph. The contact wasn't good, but it was important to finish the game."
The Marlins got an encouraging start from Brad Hand, who gave up two runs in 6 1/3 innings.
A September callup, Hand is a young lefty who showed promise in his final start. He will head into Spring Training looking to make a case as either a starter or reliever next season.
"I felt pretty good out there," Hand said. "I threw strikes for the most part."
Philadelphia's Cole Hamels also gave up two runs, but over six innings.
The Marlins had plenty of chances early off Hamels, and they were able to cash in on Hechavarria's two-run triple in the second -- his team-leading eighth triple of the year.
Ruggiano walked to open the inning and Polanco, who had three hits, singled. The triple was Hechavarria's first since Aug. 24 against the Rockies.
Hand carried a shutout into the seventh, before he got into trouble after striking out Domonic Brown to open the inning. Darin Ruf doubled, and a single by Frandsen put runners on the corners. Galvis lined an RBI single, and Hand was relieved by A.J. Ramos.
Ramos struck out pinch-hitter Cody Asche, but Cesar Hernandez hit a two-out, game-tying single.
The Marlins hoped Hand could get through the seventh and be in line for the win.
"It just takes focus and concentration, just like any other inning," Hand said. "I've got to make sure I close it out and make a good pitch."
The Marlins had a chance to reclaim the lead in a wild bottom of the seventh, which featured each team getting huge breaks from the umpires.
With Juan Pierre on second and Donovan Solano on first, reliever Cesar Jimenez spun and attempted to pick off Pierre. Rollins collected the throw as Pierre dove back -- replays showed Pierre was clearly out, but he was ruled safe by second-base umpire Dale Scott.
Rollins was in disbelief, and Sandberg came out to argue.
Then with two outs, it was the Phillies' turn to catch a break. Christian Yelich tapped a slow roller to first, which drew Frandsen away from the bag. He flipped to Jimenez, but Yelich had the edge to the base. Jimenez had the ball in his glove hand (his right), but he reached with his left and swiped Yelich. First-base umpire C.B. Bucknor ruled Yelich out, although he wasn't tagged by the hand with the ball in it.
"I felt he touched me, that's why I didn't freak out," Yelich said. "I didn't know he touched me with his hand until they all told me. If I knew that then you might be a little upset. I kind of knew I had him beat to the bag. It was one of those weird, in-between plays. He barely got my left arm."