PITTSBURGH -- Yovani Gallardo is starting to pitch like an ace again for the Milwaukee Brewers.
The right-hander continued his late-season surge Thursday night, pitched seven effective innings to beat the Pittsburgh Pirates 4-0 at PNC Park.
Gallardo (10-9) scattered six hits, walked one walk and struck out five.
It has been an up-and-down year for Gallardo after he was combined 60-38 over the previous four seasons. However, in three starts since coming off the disabled list after being sidelined by a hamstring injury, he has allowed just two earned runs in 19 1/3 innings (0.93 ERA).
Gallardo also got stronger as the game went on, retiring nine of the last 10 batters he faced.
Brandon Kintzler pitched the final two innings of the six-hit shutout.
Pittsburgh dropped one game behind first-place St. Louis, which was idle, in the National League Central race. The Pirates host the Cardinals in a three-game series beginning Friday night.
Scooter Gennett had three hits for the Brewers, Jean Segura and Carlos Gomez added two each. Aramis Ramirez homered, and Jonathan Lucroy drove in two runs.
Catcher John Buck had three hits in his Pirates debut, two days after he and right fielder Marlon Byrd were acquired in a trade from the New York Mets for two minor league prospects.
Pittsburgh rookie Gerrit Cole (6-7) gave up more than three runs for just the second time in 14 career starts, as he allowed four -- three earned -- in a career-high 7 1/3 innings. Pitching on seven days of rest as the Pirates continue to find ways to limit the 22-year-old's workload, Cole walked one, struck out four and permitted 10 hits.
It was first time Cole lost in five decisions while pitching with six days of rest or more. He also lost for the seventh time in his last nine decisions since beginning his career in June by winning his first four starts.
Milwaukee took advantage of a throwing error by Cole to score a first-inning run. Cole make a wild pickoff throw to first base, allowing Segura to advance to third, and Segura scored on Lucroy's single.
In the second inning, Khris Davis doubled home Carlos Gomez, who singled and stole second. It was the Brewers' first hit on a 3-0 count all season.
Ramirez led off the fourth with his ninth home run of the season to increase Milwaukee's lead to 3-0.
Lucroy's eighth-inning sacrifice fly capped the scoring.
NOTES: Pittsburgh LF Starling Marte, who has been on the disabled list since Aug. 19 with a bruised right hand, is swinging a bat with his left hand and may be able to start taking batting practice next week, a week earlier than planned. ... Milwaukee RF Norichika Aoki got most of the game off, grounding out as a pinch hitter in the eighth inning. He has been getting regular days off to rest his sore right knee. ... Pittsburgh LHP Francisco Liriano (14-6, 2.74) is scheduled to start Friday night against St. Louis RHP Shelby Miller (12-8, 2.90). ... The Brewers face the Los Angeles Angels on Friday in the opener of a three-game series, with RHP Wily Peralta (8-13, 4.51) facing RHP Jered Weaver (8-7, 3.46).