ST. LOUIS (AP) — Paul Goldschmidt hit a tiebreaking homer in the seventh inning and Dylan Carlson added a three-run blast to help the St. Louis Cardinals rally past the Pittsburgh Pirates 7-5.

Michael Chavis and Diego Castillo homered for Pittsburgh, which dropped its season-high seventh in a row. The Cardinals scored five times in the sixth inning to erase a 5-0 deficit.

Brendan Donovan started the comeback with a two-run double. St. Louis has won six of seven against its NL Central rival this season. Chavis highlighted a four-run outburst in the fifth with a three-run homer that put the Pirates up 5-0.