Pinch-hitter Yoshi Tsutsugo hit his first homer with Pittsburgh in the ninth.
Keller (4-10) walked one and worked around six hits in picking up his first victory since May 29. He had allowed 10 earned runs across 14 1/3 innings in his previous three starts since being recalled from Triple-A Indianapolis.
Three relievers covered the final four innings to preserve the shutout.
Rookie Lars Nootbaar had three singles to lead St. Louis’ 10-hit attack. The Cardinals stranded 12.
“We had our chances,” St. Louis manager Mike Shildt said. “We had runners in scoring position and we had 12 on base. They made good pitches and we weren’t able to cash in. We’re disappointed in it.”
St. Louis entered the day 3 1/2 games behind San Diego for the second NL wild-card spot.
Pittsburgh recorded just four hits but snapped a five-game skid. The Pirates had lost 13 of 14 before the victory.
The Pirates broke through with two runs in the fourth after Colin Moran led off with a single of Miles Mikolas (0-1). Moran has hit safely in each of his last 15 games at Busch Stadium.
Jacob Stallings hit a line drive single to center that skipped past Harrison Bader and rolled to the wall for a two-base error. A sacrifice fly by Polanco scored Stallings. Both runs were unearned.
Pittsburgh went ahead 3-0 in the sixth when Polanco’s sacrifice fly to center off Andrew Miller scored Bryan Reynolds, who led off with a double.
Mikolas, who was activated Friday after he completed a five-game injury rehabilitation assignment, threw 84 pitches over five innings in his second start of 2021. He allowed two hits with two walks and five strikeouts.
“It felt good to come off the field kind of on my own terms,” Mikolas said. “It’s a nice feeling to have an OK first outing back. I was able to rein in the butterflies and get better as the game went on. I feel pretty normal. Standard pitching type soreness. Nothing out of the ordinary.”
His previous start for the Cardinals this season came on May 22. That was his first with St. Louis since the 2019 NLCS after a flexor tendon injury sidelined him in 2020 and forearm tightness and a right shoulder injury slowed him this year.
“I thought it was a very, very encouraging outing,” Shildt said. “He got through five innings. He did more than give us a chance to win. Welcome back, Miles. It was good to see him back out there.”
RHP Chad Kuhl was reinstated Friday from the COVID IL. Kuhl had been on the COVID IL since Aug. 2, after he said he tested positive. Kuhl said his symptoms were mild, but the Pirates plan to use him out of the bullpen to build him back up. … RHP Cody Ponce was optioned to Triple-A Indianapolis. Ponce was the corresponding move to make room on the active roster for Kuhl. He has allowed 21 runs in 22 2/3 innings this season.
Pirates: OF Anthony Alford (lower back strain) has resumed baseball activities by playing catch and hitting in the cage.
Cardinals: RHP Ryan Helsley (right elbow stress reaction) has been placed on the 10-day injured list. Helsley has posted a 6-4 mark with a 4.56 ERA in 51 games while stranding a team-best 27 of 31 inherited runners. … Triple-A Memphis LHP Brandon Waddell has been placed on the COVID-19 injured list. Waddell appeared in four games for the Cardinals after coming over from Baltimore in June.
Pirates: LHP Dillon Peters (0-1, 1.93 ERA) will be making his second start of the season as a member of the Pirates. Peters, who will turn 29 on Aug. 31, was acquired by the Pirates in exchange for cash considerations on July 19 after being designated for assignment by the Angels on July 14.
Cardinals: LHP J.A. Happ (7-6, 6.03 ERA) was recently acquired from the Twins. Happ has faced the Pirates twice this season, once as a Twin and once as a Cardinal just over a week ago. He is 2-0 against them and has only allowed one earned run total between those two games.