The St. Louis Cardinals picked up a doubleheader sweep of the Pittsburgh Pirates winning game one 6-5 before taking the nitecap 7-2.

The Cardinals took the opener behind home runs from Kolten Wong and Tyler O’Neill and just enough pitching to overcome four errors.

St. Louis, playing its third doubleheader in five days, moved to .500 (24-24) with the sweep to remain in the mix for a playoff spot.

Andrew Miller (1-1) struck out the side in the top of the sixth to earn the win.

In game 2, Cardinals rookie Dylan Carlson’s three-run homer capped a six-run outburst in the sixth inning against mistake-prone Pittsburgh, helping St. Louis to a doubleheader sweep.

All six runs in the inning were unearned as the Pirates lost for the 10th time in 11 games.

Bryan Reynolds hit a long home run off St. Louis starter Daniel Ponce de Leon that ended up in the Allegheny River but otherwise the Pirates mustered little offense.

Wong started Game 1 with his second career leadoff home run.