The Marlins’ eighth inning rally spoiled Matt Morris’ bid for his 16th win of the season, as Florida topped St. Louis 7-6 in Miami.

The Cardinals overcame a 4-0 deficit and took a 5-4 lead into the eighth inning. Morris allowed Luis Castillo and Miguel Cabrera to reach on singles—Castillo bunted his way on. Morris was pulled for Ray King who gave up a two-run triple to Carlos Delgado. Next up was Juan Encarcion, who drove in pinch-runner Chris Aguila with a sacrifice fly.

St. Louis took one run off Florida’s lead in the top of the ninth with a one-out solo home run from John Mabry, but David Eckstein and Larry Walker recorded outs to end the game.

Mark Grudzielanek got the Cardinals back in the game when he hit a three-run home run in the sixth inning to tie it up at 4-4. In the eighth, Grudzielanek reached on a fielder’s choice and Albert Pujols scored from third to give the Cardinals a short-lived 5-4 advantage.

With the win, the Marlins took over the lead in the National league Wild Card race.