Andrew McCutcheon dives into home scoring a run for the Pirates. (photo/Bill Greenblatt, UPI)

Andrew McCutcheon dives into home scoring a run for the Pirates. (photo/Bill Greenblatt, UPI)

Cardinals shortstop Aledmys Diaz went 3 for 5, hit his 12th homer of the season to tie the game in the third and his single in the fourth capped a four-run rally, but the Pirates rallied from a 5-1 deficit to win 7-5.

It was Pittsburgh’s seventh win in a row and they pass the Cardinals by a half-game in the Central Division, heading into Thursday afternoon’s finale.

Jaime Garcia allowed two solo homers before walking two to start the sixth before getting pulled.  Both runs came in to score closing the Cardinals lead to 5-4.

In the seventh, the Pirates tacked on three more. Jung Ho Kang’s double off Jonathan Broxton gave Pittsburgh the lead.  Pirates relievers combined for five scoreless innings. A.J. Schugel (2-2) got the win and Mark Melancon picked up his 26th save.