ST. LOUIS -- Trevor Williams figured he might be in for a long night.
The Pittsburgh Pirates' right-hander surrendered a walk and a double to the first two St. Louis hitters he faced Wednesday.
"It was a little terrifying," Williams admitted.
The hottest pitcher in the National League had no reason to worry.
Williams (11-9) gave up three hits while striking out a career-high eight- all swinging.
"He did a great job hitting the corners," St. Louis shortstop Paul DeJong said. "His ball was moving a lot of different ways."
Williams has allowed just four earned runs over his last eight starts and improved to 5-2 with an 0.75 ERA during that stretch. He has a major-league best eight starts of at least five innings without allowing a run.
"He had to roll up his sleeves in that first inning," Pittsburgh manager Clint Hurdle said. "He doesn't get mauled at the plate and he's tough to square up. His fastball was especially effective tonight."
Williams got out of the early jam with two strikeouts and a nifty over-the-shoulder catch by second baseman Adam Frazier.
"He doesn't make that play, you never know what happens after that," Williams said. "We were just executing pitches from there on."
Marte lifted a bloop single to left field off Miles Mikolas (13-4) to bring in Jordy Mercer with the first run. Gregory Polanco followed with a run-scoring single to help Pittsburgh win for just the second time in eight games.
"We got some hits, got some action in that inning," Hurdle said.
Polanco, Frazier, and Corey Dickerson had two hits each for the Pirates.
The Cardinals, who dropped to 16-4 in their last 20, are now 4 1/2 games behind first-place Chicago in the NL Central. They hold the first wild card spot and have a half-game lead over Milwaukee.
St. Louis fell to 27-13 under manager Mike Shildt, who took over for Mike Matheny on July 15. Shildt was rewarded with a two-year contract on Tuesday.
Mikolas gave up two runs and eight hits over five innings. He struck out five and walked one.
"I think out of a couple hits they got, they hit one or two hard," Mikolas said. "I don't want to say I'm a victim of bad luck, but a couple of those, a couple of feet this way or that way, I don't think they're scoring at all."
The Pirates are 12-19 after winning 11 straight from July 11-24.
St. Louis infielder Matt Carpenter left the game in the fourth inning with a stomach ailment.
FIRST INNING SUCCESS
St. Louis starting pitchers have not allowed a run in the first inning of their last 11 games. Mikolas struck out Dickerson with the bases loaded to keep the streak alive.
Pirates: INF Jordy Mercer was activated from the 10-day disabled list prior to the game. He went on the DL with a left calf strain on Aug. 16. ... INF Sean Rodriguez has been designed for assignment. He hit .167 with five home runs and 19 RBI in 67 games this year.
Cardinals: INF Jedd Gyorko was placed on the 10-day disabled list with a left groin strain suffered in Tuesday's 5-2 win. OF Adolis Garcia was recalled from Triple-A Memphis. Garcia had 22 home runs and 71 RBI in 112 games with the Redbirds.
More AP MLB: https://apnews.com/tag/MLB and https://twitter.com/AP-Sports
Trout on playing for Phillies: 'I can't predict the future'
Mike Trout jokes that he is asked when he will join the Phillies every day and says he has not spoken to Bryce Harper or Manny Machado.
Miguel Cabrera faces pitcher for 1st time since June arm injury
Miguel Cabrera says he is fully healthy and ready to get back on the field and play. The two-time AL MVP hit against a pitcher Monday for the first time since rupturing a tendon in his left biceps on June 12.
Red Sox owner John Henry says spending more tends to helps teams win
Boston Red Sox owner John Henry said Monday that, while there is not a perfect correlation between a bigger payroll and winning, "spending more money helps."
Bochy: 'It's been an unbelievable ride'
Giants manager Bruce Bochy announces his upcoming retirement and explains how much he has cherished his time in San Francisco.
Mike Moustakas' return has Brewers teammates excited
The Milwaukee Brewers were excited to know Mike Moustakas likely is sticking around for 2019.
Rockies moving All-Star Charlie Blackmon to right field
It may not seem right, but Charlie Blackmon will be in right field for Colorado this season after playing center field since 2015.