MIAMI (AP) -- John Buck and pinch hitter Logan Morrison connected for consecutive home runs in the seventh inning, rallying the Miami Marlins past St. Louis 5-3 Wednesday night and ending their eight-game losing streak against the Cardinals.
The Cardinals had won five in a row overall. Miami won for just the second time in 10 games.
Tony Cruz's first career homer in the top of the seventh put the Cardinals ahead 3-2.
Buck tied it with one out when he homered off Fernando Salas. Morrison then sent a drive off Sam Freeman (0-1) that hit the top of the right-field fence, bounced off a nearby railing and dropped back into play.
After being stopped at second base while the umpires reviewed the play, Morrison was allowed to finish his home-run trot. It was Morrison's first career pinch-hit home run.
Buck has seven home runs this season, including three in his last six games. This was the second time the Marlins have hit back-to-back home runs this season -- Justin Ruggiano and Morrison accomplished the feat on June 1 at Philadelphia.
Omar Infante's RBI double in the eighth gave the Marlins an insurance run.
Anibal Sanchez (4-6) ended his three-game losing streak, allowing three runs in seven innings.
Steve Cishek pitched the eighth and Heath Bell recorded his 15th save in 19 chances by pitching the ninth. He got Allen Craig to pop up with Matt Carpenter on second to end the game.
The Cardinals took a 2-0 lead on a sacrifice fly by Carlos Beltran and an RBI double by David Freese.
The Marlins tied it at 2 in the fifth against Joe Kelly on an RBI single by Buck and a groundout by Jose Reyes.
NOTES: Cruz, a 25-year-old backup catcher, homered in his 117th career at-bat. ... Marlins manager Ozzie Guillen is hoping his team can duplicate the Miami Heat's success in capturing a championship. "Having the Miami Heat winning, to me, was an inspiration," Guillen said. "I hope for the players, too. When I saw those guys in the parade talking, I got jealous. I want to be them. I wish I was the coach. That's my inspiration for the rest of my career here in Miami." ... Both teams will have the day off on Thursday before St. Louis hosts Pittsburgh, with RHP Adam Wainwright (6-7, 4.32 ERA) opposing RHP Kevin Correia (3-6, 4.03 ERA). The Marlins will host Philadelphia and will start LHP Mark Buehrle (6-8, 3.55 ERA) on Friday.