ST. LOUIS _ Pittsburgh right-hander Trevor Williams was in trouble early against the Cardinals Wednesday night.
But he escaped the jam and went on to pitch six strong innings to lead the Pirates to a 2-0 win before 33,448 at Busch Stadium.
The deciding game of the series is Thursday at 6:15 p.m.
After the Cardinals' Miles Mikolas escaped a jam of his own in the top of the inning, Williams walked Matt Carpenter and then surrendered a double to Yadier Molina.
But Williams, who entered with a 0.86 ERA over his previous seven starts, struck out Jose Martinez and then got a defensive gem from second baseman Adam Frazier, who came up with a back-to-the-infield grab on a shallow fly to right-center off the bat of Tyler O'Neill. The inning ended with a Paul DeJong strikeout.
Williams (11-9) allowed three hits and three walks over six shutout innings. He also struck out eight Cardinals while lowering his ERA to 3.30.
The Pirates also threatened in the first, loading the bases on a one-out double from Frazier, a two-out walk from Francisco Cervelli and a two-out infield single from Corey Dickerson. But Mikolas (13-4) got Josh Bell on a fly ball to Harrison Bader in center to end the threat.
With one on and one on in the top of the fourth, Carpenter was replaced at first base by Matt Adams. Before the inning was over, the Cardinals announced that their first baseman was feeling nauseous. Carpenter had walked in two plate appearances Wednesday. The Cardinals' infield is now without its starter at first (Carpenter), second (Kolten Wong) and third (Jedd Gyorko). Wong (hamstring) went to the 10-day DL on Tuesday, with Gyorko (groin) joining him earlier Wednesday.
In the fifth, the Pirates came up with the game's first runs. After Jordy Mercer led off with a double, Williams bunted to Adams, who threw late to third, but Yairo Munoz alertly fired the ball across the diamond to second baseman Greg Garcia to retire Williams at first.
A broken-bat single to left from Starling Marte put the visitors on top 1-0. After Frazier's perfectly executed hit-and-run single through the vacated shortstop hole put runners at first and third, Gregory Polanco singled to right for a 2-0 lead.
Adams led off the Cardinals sixth with a hit and Martinez walked a bat later. But Williams struck out O'Neill and got DeJong to fly out.
With one out in the seventh, Bader reached on an error and Munoz was hit by pitch. But pinch-hitter Patrick Wisdom struck out and Adams popped out to third.
The Pirates outhit the Cardinals 10-5, getting two-hit games from Frazier, Corey Dickerson and Polanco, and RBIs from Polanco and Marte. Williams and relievers Edgar Santana, Keone Kela and Felipe Vazquez combined for the shutout, with Vazquez picking up his 28th save of the season.
The Cardinals, who struck out 10 times and hit into a double play, got hits from Molina, Martinez, DeJong, Munoz and Adams.