ST. LOUIS (AP) — Marcell Ozuna regained his swing in time to be in the middle of a breakout rally by the St. Louis Cardinals.

Paul Goldschmidt hit a tiebreaking single in the eighth inning, Ozuna followed with a two-run homer and the Cardinals beat the Pittsburgh Pirates 6-2 on Friday night.

Goldschmidt's single went under the glove of Pirates shortstop Kevin Newman, scoring Dexter Fowler to break a 2-all tie. Five pitches later, Ozuna drove a 99 mph fastball from Richard Rodriguez (3-5) into the left field bullpen for his second homer in two games. The Cardinals tacked on an extra run when Paul DeJong reached on an error by José Osuna and scored on Matt Carpenter's sacrifice fly.

"We just really try to have good at-bats from the first hitter on," Goldschmidt said. "If we do that, we hit the ball hard, runs will come."

Runs have been hard to come by for the Cardinals of late. The four-run rally in the eighth snapped a 54-inning stretch without scoring multiple runs in an inning.

"We know they can do it," Cardinals manager Mike Shildt said. "It's good to see them do it and obviously we need to be more consistent with it. If we do that, the sky's the limit."

Ozuna, who was activated from the injured list last Saturday after missing 28 games due to fractured fingers in his right hand, drove in four runs.

"I'm good," Ozuna said. "My hand feels good. I just have to play and make good swings."

The rally made a winner out of Carlos Martínez (3-2), who pitched the final 1 1/3 innings as the Cardinals snapped a five-game losing streak.

Cardinals starter Dakota Hudson threw a season-low 49 pitches through four innings. He gave up two runs on six hits and didn't walk or strike out anyone.

Shildt said Hudson was dealing with a minor finger issue that had the trainers check on him in the second inning. With a rested bullpen and a chance for an offensive rally, Shildt pulled Hudson for pinch-hitter José Martínez in the fourth inning.

"We had an opportunity to get him out of there with the finger and put it behind him, make sure it doesn't linger," said Shildt, who added that Hudson could have pitched through it.

Tyler Webb, John Brebbia and Andrew Miller pitched 3 2/3 innings of scoreless relief to bridge the game to Carlos Martínez.

The Pirates lost their sixth straight and are 4-22 since the All-Star break.

"It's tough," Pittsburgh starter Chris Archer said. "I don't mean to sound like a broken record but I know the past few games our starters have said it's been a grind, and it has been. But we're not giving up. We're not going down without a fight."

Josh Bell doubled and scored on sacrifice flies by Osuna in the second and Colin Moran in the fourth for the Pirates' two runs.

The first three Cardinals batters of the game singled to load the bases, but Archer escaped the jam with only one run allowed by getting Ozuna to ground into a double play and striking out DeJong.

St. Louis tied the game at 2 in the fourth when Matt Wieters legged out an infield hit to score Carpenter.

Archer gave up two runs on seven hits in six innings. His nine strikeouts were one shy of his season best.

"There were a lot of good things that happened tonight," Pirates manager Clint Hurdle said. "We didn't win the game. That's the goal to start, but Archer's outing was so solid. No walks, nine strikeouts. His first-pitch strikes were off the charts, 19 out of 24, something I haven't seen very often."

RETURN ENGAGEMENT

The Pirates plan to promote RHP Mitch Keller from Triple-A Indianapolis to start Monday night's game at the Los Angeles Angels. Keller is 0-1 with a 12.50 ERA in three starts this season.

TRAINING ROOM

Pirates: RHP Clay Holmes (right triceps inflammation) threw two scoreless innings with Double-A Altoona on Thursday night.

Cardinals: C Yadier Molina (right thumb tendon strain) went 0 for 4 and caught all nine innings as he continued his rehabilitation assignment at Double-A Springfield. Shildt said Molina could join the team next week.

UP NEXT

Pirates: RHP Joe Musgrove (8-10, 4.69) gets the start in the second of a three-game series at St. Louis on Saturday night. He is 1-5 with a 7.39 ERA in six career starts against the Cardinals.

Cardinals: RHP Adam Wainwright (7-8, 4.50) will look to continue his strong season at home, where he is 5-2 with a 2.26 ERA in 10 starts. His 34 career starts and 182 strikeouts against Pittsburgh are the most among active pitchers.

———

Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.