Miles Mikolas pitched an eight-hitter and Tyler O'Neill hit a pair of two-run homers, leading the St. Louis Cardinals to a 7-0 win over the Pittsburgh Pirates on Monday night.

It was the first complete game this season and second overall for Mikolas (6-9), who lasted just four innings in his last start before the All-Star game. He struck out three and walked none while throwing 100 pitches.

More Images
St. Louis Cardinals starting pitcher Miles Mikolas is doused by teammate Michael Wacha, right, while being interviewed by television reporter Jim Hayes, left, after throwing a complete game shutout against the Pittsburgh Pirates in a baseball game Monday, July 15, 2019, in St. Louis. (AP PhotoJeff Roberson)

Miles Mikolas pitched an eight-hitter and Tyler O'Neill hit a pair of two-run homers, leading the St. Louis Cardinals to a 7-0 win over the Pittsburgh Pirates on Monday night.

St. Louis Cardinals' Tyler O'Neill, right, rounds the bases after hitting a two-run home run off Pittsburgh Pirates starting pitcher Joe Musgrove during the fifth inning of a baseball game Monday, July 15, 2019, in St. Louis. (AP PhotoJeff Roberson)

Mikolas pitched out of three jams. In the fifth with two outs, he gave up singles by Corey Dickerson and Kevin Newman. A balk put runners on second and third. Mikolas got Jacob Stallings to ground out, ending the inning. In the sixth, he allowed one-out singles to Adam Frazier and Brian Reynolds, his third hit. Starling Marte grounded into an inning-ending double play. He also hit into a double play in the first inning. In the seventh, Colin Moran doubled with one out and was stranded at third.

St. Louis Cardinals' Tyler O'Neill, right, is congratulated by teammate Yairo Munoz after hitting a two-run home run during the fifth inning of a baseball game against the Pittsburgh Pirates, Monday, July 15, 2019, in St. Louis. (AP PhotoJeff Roberson)

The Pirates have lost four consecutive games.

Pittsburgh Pirates right fielder Bryan Reynolds catches a fly ball by St. Louis Cardinals' Kolten Wong for an out during the second inning of a baseball game Monday, July 15, 2019, in St. Louis. (AP PhotoJeff Roberson)

The Cardinals scored an unearned run in the first inning. Paul Goldschmidt walked with two outs and O'Neill hit a line drive that Dickerson dropped, allowing Goldschmidt to score. Musgrove ended up striking out the side but he needed 36 pitches without allowing a hit to get out of the inning.

Pittsburgh Pirates starting pitcher Joe Musgrove pauses on the mound after giving up a single to St. Louis Cardinals' Tyler O'Neill during the third inning of a baseball game Monday, July 15, 2019, in St. Louis. (AP PhotoJeff Roberson)

O'Neill got his second home run to center off reliever Kyle Crick in the seventh after Goldschmidt walked with two outs.

St. Louis Cardinals' Paul Goldschmidt runs in to score during the first inning of a baseball game against the Pittsburgh Pirates, Monday, July 15, 2019, in St. Louis. (AP PhotoJeff Roberson)

HAPPY BIRTHDAY

St. Louis Cardinals' Paul Goldschmidt, right, scores past Pittsburgh Pirates catcher Jacob Stallings during the first inning of a baseball game Monday, July 15, 2019, in St. Louis. (AP PhotoJeff Roberson)

Pirates: OF Gregory Polanco (left shoulder inflammation) left his rehabilitation appearance with Triple-A Indianapolis after two plate appearances with left shoulder tightness. The Pirates rested Polanco on Monday and will examine him Tuesday.

Pittsburgh Pirates' Bryan Reynolds (10) is out at second as St. Louis Cardinals second baseman Kolten Wong, right, turns the double play during the first inning of a baseball game Monday, July 15, 2019, in St. Louis. Pirates' Starling Marte was out at first. (AP PhotoJeff Roberson)

Pirates: RHP Dario Agrazal (2-0, 2.18) will be making his third big-league start. In his last outing, he went six innings and allowed two runs against Milwaukee.

It was first complete game by a Cardinals pitcher this season. Mikolas had the only one last year on May 21 against Kansas City.

St. Louis Cardinals starting pitcher Miles Mikolas is doused by teammate Michael Wacha, right, while being interviewed by television reporter Jim Hayes, left, after throwing a complete game shutout against the Pittsburgh Pirates in a baseball game Monday, July 15, 2019, in St. Louis. (AP PhotoJeff Roberson)

St. Louis Cardinals starting pitcher Miles Mikolas is doused by teammate Michael Wacha, right, while being interviewed by television reporter Jim Hayes, left, after throwing a complete game shutout against the Pittsburgh Pirates in a baseball game Monday, July 15, 2019, in St. Louis. (AP PhotoJeff Roberson)

Mikolas pitched out of three jams. In the fifth with two outs, he gave up singles by Corey Dickerson and Kevin Newman. A balk put runners on second and third. Mikolas got Jacob Stallings to ground out, ending the inning. In the sixth, he allowed one-out singles to Adam Frazier and Brian Reynolds, his third hit. Starling Marte grounded into an inning-ending double play. He also hit into a double play in the first inning. In the seventh, Colin Moran doubled with one out and was stranded at third.

St. Louis has won three games in a row.

O'Neill had his first career multi-homer game, and drove in four runs for the second time in the last three games. He also singled to fhinish with three hits.

St. Louis Cardinals' Tyler O'Neill, right, rounds the bases after hitting a two-run home run off Pittsburgh Pirates starting pitcher Joe Musgrove during the fifth inning of a baseball game Monday, July 15, 2019, in St. Louis. (AP PhotoJeff Roberson)

St. Louis Cardinals' Tyler O'Neill, right, rounds the bases after hitting a two-run home run off Pittsburgh Pirates starting pitcher Joe Musgrove during the fifth inning of a baseball game Monday, July 15, 2019, in St. Louis. (AP PhotoJeff Roberson)

The Pirates have lost four consecutive games.

Pittsburgh starter Joe Musgrove (6-8) gave up five runs and five hits in 4 2/3 innings. He struck out seven and walked three along with hitting a batter.

Dickerson had rough night in left field and figured prominently in the first two St. Louis runs.

St. Louis Cardinals' Tyler O'Neill, right, is congratulated by teammate Yairo Munoz after hitting a two-run home run during the fifth inning of a baseball game against the Pittsburgh Pirates, Monday, July 15, 2019, in St. Louis. (AP PhotoJeff Roberson)

St. Louis Cardinals' Tyler O'Neill, right, is congratulated by teammate Yairo Munoz after hitting a two-run home run during the fifth inning of a baseball game against the Pittsburgh Pirates, Monday, July 15, 2019, in St. Louis. (AP PhotoJeff Roberson)

The Cardinals scored an unearned run in the first inning. Paul Goldschmidt walked with two outs and O'Neill hit a line drive that Dickerson dropped, allowing Goldschmidt to score. Musgrove ended up striking out the side but he needed 36 pitches without allowing a hit to get out of the inning.

St. Louis went ahead 3-0 in the third. Matt Carpenter was called out at first on a close play to start the inning. After a 37-second challenge, the call was overturned. With one out, Goldschmidt hit a fly ball to deep left in front of the fence. The ball hit Dickerson's glove and popped out. It was ruled a double. An infield hit by O'Neill moved Goldschmidt to third and he came home on a sacrifice fly by Dexter Fowler.

The Cardinals chased Musgrove in the fifth. DeJong singled after Carpenter was picked off first by Stallings. After Goldschmidt struck out, Musgrove gave up a two-run homer to center field on his first pitch to O'Neill, giving St. Louis a 5-0 lead.

Pittsburgh Pirates right fielder Bryan Reynolds catches a fly ball by St. Louis Cardinals' Kolten Wong for an out during the second inning of a baseball game Monday, July 15, 2019, in St. Louis. (AP PhotoJeff Roberson)

Pittsburgh Pirates right fielder Bryan Reynolds catches a fly ball by St. Louis Cardinals' Kolten Wong for an out during the second inning of a baseball game Monday, July 15, 2019, in St. Louis. (AP PhotoJeff Roberson)

O'Neill got his second home run to center off reliever Kyle Crick in the seventh after Goldschmidt walked with two outs.

INJURY

Carpenter fouled a ball of the top his right foot in the seventh and had to leave the game. With a 3-2 count, Tommy Edman came in to finish the at-bat. He struck out and it was charged to Carpenter.

Pittsburgh Pirates starting pitcher Joe Musgrove pauses on the mound after giving up a single to St. Louis Cardinals' Tyler O'Neill during the third inning of a baseball game Monday, July 15, 2019, in St. Louis. (AP PhotoJeff Roberson)

Pittsburgh Pirates starting pitcher Joe Musgrove pauses on the mound after giving up a single to St. Louis Cardinals' Tyler O'Neill during the third inning of a baseball game Monday, July 15, 2019, in St. Louis. (AP PhotoJeff Roberson)

HAPPY BIRTHDAY

Cardinals Hall of Famer and broadcaster Mike Shannon celebrated his 80th birthday. The two-time World Series champion has been with the Cardinals for 62 years, including nine in a St. Louis uniform. He became a broadcaster in 1972 and has been there ever since. A cake was delivered to Shannon after two innings and was shown on the scoreboard. The fans began singing "Happy Birthday" accompanied by the stadium organist.

TRAINING ROOM

St. Louis Cardinals' Paul Goldschmidt runs in to score during the first inning of a baseball game against the Pittsburgh Pirates, Monday, July 15, 2019, in St. Louis. (AP PhotoJeff Roberson)

St. Louis Cardinals' Paul Goldschmidt runs in to score during the first inning of a baseball game against the Pittsburgh Pirates, Monday, July 15, 2019, in St. Louis. (AP PhotoJeff Roberson)

Pirates: OF Gregory Polanco (left shoulder inflammation) left his rehabilitation appearance with Triple-A Indianapolis after two plate appearances with left shoulder tightness. The Pirates rested Polanco on Monday and will examine him Tuesday.

Cardinals: RHP Michael Mayers (right shoulder lat strain) remains on a rehabilitation assignment with Triple-A Memphis. He went on a 30-day injury rehab June 26.

UP NEXT

St. Louis Cardinals' Paul Goldschmidt, right, scores past Pittsburgh Pirates catcher Jacob Stallings during the first inning of a baseball game Monday, July 15, 2019, in St. Louis. (AP PhotoJeff Roberson)

St. Louis Cardinals' Paul Goldschmidt, right, scores past Pittsburgh Pirates catcher Jacob Stallings during the first inning of a baseball game Monday, July 15, 2019, in St. Louis. (AP PhotoJeff Roberson)

Pirates: RHP Dario Agrazal (2-0, 2.18) will be making his third big-league start. In his last outing, he went six innings and allowed two runs against Milwaukee.

Cardinals: RHP Jack Flaherty (4-6, 4.64) will be making his sixth career start and appearance against Pittsburgh and first one this season. The Cardinals are 4-1 in his five starts against Pittsburgh, winning the last four.

More AP MLB: https://apnews.com/MLB and https://twitter.com/AP_Sports

Pittsburgh Pirates' Bryan Reynolds (10) is out at second as St. Louis Cardinals second baseman Kolten Wong, right, turns the double play during the first inning of a baseball game Monday, July 15, 2019, in St. Louis. Pirates' Starling Marte was out at first. (AP PhotoJeff Roberson)

Pittsburgh Pirates' Bryan Reynolds (10) is out at second as St. Louis Cardinals second baseman Kolten Wong, right, turns the double play during the first inning of a baseball game Monday, July 15, 2019, in St. Louis. Pirates' Starling Marte was out at first. (AP PhotoJeff Roberson)