MIAMI -- A back-to-back boost helped the Marlins get on track.
John Buck and Logan Morrison delivered successive home runs in the seventh inning that lifted Miami to a 5-3 win over the Cardinals on Wednesday night in front of 28,397 fans at Marlins Park.
The Marlins avoided a sweep, claiming the series finale while improving to 6-18 in June.
Anibal Sanchez gave up three runs in seven innings, striking out four, while winning for the first time since May 29.
"This gives you the feeling of what kind of ballclub we've got," manager Ozzie Guillen said. "That's the ballclub I try to defend. I know this ballclub and what they can do. That was a game with a lot of enthusiasm, a lot of positives. Everybody contributed a little bit. The game started very poorly, then Sanchez turned the thing around and pitched a heck of a game."
Miami's 22nd comeback win was the club's first since June 2.
Heath Bell worked around a leadoff single in the ninth inning by Matt Carpenter to secure his 15th save in 19 tries.
The night also was one in which the Marlins had a key bounce go their way. It occurred in the seventh inning on Morrison's home run, which overturned what was ruled a double into the game-winning drive of the night.
"It's not about one bounce," Morrison said of the team reversing its luck. "It's about consistently getting bounces."
In a homer-happy seventh inning, the Marlins claimed a one-run lead.
The Cardinals initially went ahead, 3-2, on Tony Cruz's first career home run. The catcher, getting the start in place of Yadier Molina, connected on Sanchez's first pitch of the seventh inning.
"I was thinking, 'Throw the first pitch for a strike,' and he jumped on it," Sanchez said. "All of the ones they were jumping on the first pitch were fly balls or something like that. He got a home run with that pitch. If I keep the score close, I think they can pick me up."
The Marlins responded in their half of the inning. With one out, Buck went deep to left off Fernando Salas.
St. Louis made a pitching change, bringing in lefty Sam Freeman to face the left-handed-hitting Morrison, who lined a shot to right.
Morrison wasn't given the start against Cardinals right-hander Joe Kelly. But in the seventh inning, after Freeman entered, Guillen went with the lefty-lefty matchup.
"LoMo, that's the best guy we had there," Guillen said. "It was a tie game against a lefty. I was thinking, 'Do something different.' Thank God, I don't change my mind. I was worried that could be my last opportunity to score some runs."
Morrison's drive struck off the padding atop the wall, clanked off a railing, and the ball landed back in play. Initially, no home run signal was called, and Morrison stopped at second. Guillen approached crew chief Jerry Layne, and the umpires left the field to review the play.
"I thought it hit the back of the concrete and came back on the field," Morrison said.
A couple of minutes later, the umpired changed their call to home run.
"[My thought] was to attack and execute pitches, of course," Freeman said. "That didn't happen. The end result was one that wasn't desired."
The ball was retrieved and later presented to Morrison.
"I'll probably have Matt Stairs sign it," Morrison joked.
Stairs is known for providing tape-measured pinch-hit home runs from the left side.
"As soon as he hit it, I knew that ball hit the back of the rail," Guillen said. "Thank God, we have instant replay, because now it was going to be a double. That helped a lot. It also helps the umpires."
Miami added an insurance run in the eighth inning on Omar Infante's RBI double.
After falling behind by two runs early, the Marlins pulled even with a two-run fifth inning. A pair of leadoff walks to Infante and Gaby Sanchez got the inning going. Buck delivered an RBI single, putting runners on the corners. And Jose Reyes' groundout to second base made it 2-2.
"We've been getting guys in scoring position, and we haven't been getting them in," Buck said. "That's something we need to do, especially since it's been pretty written about how the lower part of the lineup is not carrying our own. So to have the lower part of the lineup do it tonight, hopefully that will spark us down there, too."
Early trouble caught up with the Marlins again.
A night after scoring five unearned runs in the first inning on Tuesday, the Cardinals pushed two runs across in the top frame.
Jon Jay drew a one-out walk and he moved to third on Matt Holliday's double. Carlos Beltran lifted a sacrifice fly to center. David Freese delivered a two-out RBI double.
The arm of Giancarlo Stanton prevented another run. On Carpenter's single to right, Stanton threw Freese out at the plate.
"It took me out of the first inning," Sanchez said. "They swing the [bats aggressively] whole game. The first inning, they find the holes. That was a big out right there."