The decisive inning turned out being the first for Alvarez, who walked three and gave up both runs before the Marlins made a trip to the plate.
"The key for a guy like Henderson is to learn from each start," Miami manager Mike Redmond said. "He's had one inning, one bump in the road, it seems like every single outing that kind of costs him the game or a couple of runs, or the big inning. Like any pitcher, you look at that, and say, 'I've got to eliminate that big inning.'"
From there, the right-hander settled and was sparkling, scattering five total hits while striking out five. His 109 pitches were a season high. Normally a strike thrower, Alvarez was hurt by his rare wild first inning.
Of his first 26 pitches, only 12 were for strikes.
"The first inning, I was a little out of control. I walked three. I'm not a pitcher who walks a lot of guys," Alvarez said in Spanish. "I was pitching from behind, and my mechanics were a little too sped up."
The Phillies got the rally going on Jimmy Rollins' one-out double. Alvarez then encountered a wild stretch, walking Chase Utley and Domonic Brown to load the bases. A third consecutive walk, to Darin Ruf, forced home a run. Kevin Frandsen's RBI groundout to shortstop put Miami in a two-run deficit.
Encouraging signs followed in the penultimate start for Alvarez (4-6). The right-hander showed good velocity, reaching 96 mph, and he was able to work deep into the game. It's something to build on for his last appearance, which will be Sunday's finale against the Tigers.
"He's a good-looking pitcher," Phillies manager Ryne Sandberg said. "He had good stuff -- a good live fastball. He stayed ahead of the hitters. Two-seam fastball got a lot of ground balls. He pitched a nice ball game."
From a team perspective, the setback means Miami has reached an unenviable milestone. No longer are the 1998 Marlins, who lost 108 games, the only squad in franchise history to reach the century mark in losses.
The Marlins are now 58-100 with four games remaining.
"I was trying to come up with something clever to say when you lose your 100th game of the season," Redmond said. "All I could come up with was, at least it was by one run.
"I guess that shows that we're in the games, and that's maybe a moral victory for us. But at the end of the day, it's still a loss."
After losing 93 games a year ago, the Marlins redirected. They are relying on young players, like Christian Yelich, who was 1-for-4 on the night.
Yelich, 21, says the players have played hard and stuck together through adversity.
"It just didn't happen this year; we lost 100 games," Yelich said. "You can kind of learn from it. It's still not a lost year, even though we lost 100 games. There are guys in here who've gotten some experience."
Phillies starter Zach Miner was staked to a two-run lead before he threw a pitch, but did not qualify for the win because he didn't last the necessary five innings. In four innings, he gave up one run on four hits.
Miami trimmed its deficit in half in the second on Justin Ruggiano's RBI double to left-center, which scored Giancarlo Stanton, who ripped a shattered-bat single to center to lead off.
Ruggiano had a chance to remain on second, in scoring position, with no outs. But he was aggressive, trying to reach third in anticipation of a throw home. The relay was cut off, and Ruggiano was out easily.
"I told him, you just have to understand how many outs there are," Redmond said. "He was in scoring position and just got a little bit too aggressive. You can't fault him for trying to get to third, but the play is in front of him there. That's a learning moment for him -- just make sure that he understands how many outs there are and the situation of the game."
The Marlins stranded runners in scoring position in the third, fourth and sixth innings.
"It's not for lack of effort," Yelich said. "No one has mailed it in or cashed it in. I feel like everyone plays hard every night. It just hasn't happened for us sometimes."