ST. LOUIS (AP) J.A. Happ pitched seven scoreless innings and Starling Marte drove in three runs to lead the Pittsburgh Pirates to a 9-3 victory over the St. Louis Cardinals on Friday night.

Happ 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. Happ (4-1) lowered his ERA with the Pirates to 1.57.

Pittsburgh ended a four-game losing streak and cut St. Louis' lead in the NL Central to 5 1/2 games. It was the Pirates' fourth win in their last 17 games at Busch Stadium.

More from FoxSports

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. Martinez 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.

Marte added a two-out, two-run double in the fifth for his first three-RBI game since June 5. Andrew McCutchen had two hits and scored three runs in his return to the lineup.

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' run with an eighth-inning double. Piscotty had two hits and extended his hitting streak to 11 games.

TRAINER'S ROOM

Pirates: RHP A.J. Burnett (elbow) threw a simulated game before batting practice. ''Another step forward,'' manager Clint 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.

UP NEXT

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.