ST. LOUIS — J.A. Happ is happy to be back in the National League and pitching in a pennant race.
Happ (4-1) allowed only three singles and won for the fourth time in six starts since being acquired from Seattle at the July 31 trade deadline. He retired 15 straight batters in one stretch, matched his season-high with eight strikeouts and walked none. He lowered his ERA with the Pirates to 1.57.
"It's been a good transition," Happ said. "(There's) definitely some excitement on this team and possibilities for it."
Happ was 4-6 with a 4.64 ERA before the trade.
"Sometimes a change of scenery can give a guy a shot in the arm," Pirates manager Clint Hurdle said. "You don't want to be a weak link and you re-acquire your focus knowing you're being counted on. He's showed up well."
After being swept at last-place Milwaukee, Pittsburgh cut St. Louis' lead in the NL Central to 5 1/2 games with its first win since Happ beat the Colorado Rockies last Saturday. It was the Pirates' fourth win in their last 17 games at Busch Stadium.
"Happ was doing whatever he wanted," Cardinals manager Mike Matheny said. "He was on. That's all there really was to it."
Brandon Moss, who was traded from Cleveland to St. Louis at the deadline, had seen plenty of Happ when the left-hander spent the past three years in the American League.
"He had the velocity but he was a little more erratic with his command," Moss said. "He kept the ball down really well and didn't miss over the middle of the plate. It always seemed like he was ahead and they were quality pitches."
Carlos Martinez (13-7), pitching for the first time in eight days, gave up four runs and seven hits and three walks in five innings. The 23-year-old was given extra rest because of a tight back and to monitor a workload that has reached 159 2/3 innings.
He allowed two runs in a 36-pitch first inning when the Pirates scored on a bloop single by Jung Ho Kang and a broken-bat single by Marte.
"We know giving him extra rest anytime we can get is the right thing to do," Matheny said. "If the results don't look right in the back end, so be it. That's what we have to do to keep these guys healthy and hopefully strong."
Andrew McCutchen had two hits and scored three runs in his return to the lineup after sitting out Thursday night.
"We weren't swinging at his pitches," McCutchen said of Martinez. "When we wait on our pitch and are ready to hit it, good things happen."
Marte added a two-out, two-run double in the fifth for his first three-RBI game since June 5.
The Pirates scored four runs in the ninth on five hits and finished with 17 hits, their most against the Cardinals since June 29, 2012.
Rookie Stephen Piscotty drove in the Cardinals' first run with an eighth-inning double. Piscotty had two hits and extended his hitting streak to 11 games.
Pirates: RHP A.J. Burnett (elbow) threw a simulated game before batting practice. "Another step forward," Hurdle said. Burnett, who last pitched July 30, is hoping to return before the end of the regular season.
Cardinals: CF Jon Jay (left wrist) was activated from the disabled list after missing the past 57 games. He entered in the sixth and went 0 for 2.
Pirates: RHP Charlie Morton (8-6, 4.22) is 2-10 with a 5.58 ERA in 16 meetings against the Cardinals.
Cardinals: LHP Jaime Garcia (7-4, 2.03) will make his first start against the Pirates in three years. He gave up four earned runs at San Francisco last Sunday, the first time he allowed that many this season.