Paul Goldschmidt hit a solo home run with two outs in the bottom of the 11th inning to give the St. Louis Cardinals a 2-1 victory over the Miami Marlins on Wednesday night.

Dexter Fowler had an RBI single in the sixth for the Cardinals, who won for the seventh time in 11 games. Miguel Rojas tied it with a single in the eighth off reliever Carlos Martínez.

More Images
St. Louis Cardinals' Kolten Wong, right, and Miles Mikolas, left, dump water onto Paul Goldschmidt after he hit the game-winning home run during the 11th inning of a baseball game against the Miami Marlins, Wednesday, June 19, 2019, in St. Louis. The Cardinals won 2-1. (AP PhotoL.G. Patterson)

Paul Goldschmidt hit a solo home run with two outs in the bottom of the 11th inning to give the St. Louis Cardinals a 2-1 victory over the Miami Marlins on Wednesday night.

St. Louis Cardinals celebrate Paul Goldschmidt's game-winning home run in a baseball game against the Miami Marlins, Wednesday, June 19, 2019, in St. Louis. The Cardinals won 2-1 in 11 innings. (AP PhotoL.G. Patterson)

St. Louis loaded the bases with none out in the 10th, but Sergio Romo escaped for Miami. He struck out Harrison Bader and got Marcell Ozuna to ground into an 8-4-3 double play started by center fielder JT Riddle as part of a five-man infield.

St. Louis Cardinals starting pitcher Daniel Ponce de Leon delivers during the first inning of a baseball game against the Miami Marlins, Wednesday, June 19, 2019, in St. Louis. (AP PhotoL.G. Patterson)

John Gant (7-0) got the win with a perfect inning.

St. Louis Cardinals first base coach Stubby Clapp sprays himself with bug spray during the fifth inning of the team's baseball game against the Miami Marlins, Wednesday, June 19, 2019, in St. Louis. (AP PhotoL.G. Patterson)

Richards pitched around a pair of walks in the third, but couldn't get out of more trouble in the sixth. Fowler's single, the third hit of the inning, snapped a 14-inning scoreless drought for the Cardinals and ended Richards' night as he left to boisterous applause from his hometown cheering section.

Miami Marlins' Jorge Alfaro, left, scores past St. Louis Cardinals catcher Matt Wieters during the eighth inning of a baseball game Wednesday, June 19, 2019, in St. Louis. (AP PhotoL.G. Patterson)

BIG FISH

Miami Marlins' Starlin Castro watches a pop fly above his head during the second inning of a baseball game against the St. Louis Cardinals, Wednesday, June 19, 2019, in St. Louis. (AP PhotoL.G. Patterson)

TRAINER'S ROOM

Miami Marlins starting pitcher Trevor Richards delivers during the first inning of a baseball game against the St. Louis Cardinals, Wednesday, June 19, 2019, in St. Louis. (AP PhotoL.G. Patterson)

UP NEXT

After beginning the game on the bench, Goldschmidt entered at first base in the ninth. Two innings later, he launched a 453-foot drive on a changeup from Adam Conley (1-7) for his fifth career walk-off home run.

St. Louis Cardinals' Kolten Wong, right, and Miles Mikolas, left, dump water onto Paul Goldschmidt after he hit the game-winning home run during the 11th inning of a baseball game against the Miami Marlins, Wednesday, June 19, 2019, in St. Louis. The Cardinals won 2-1. (AP PhotoL.G. Patterson)

St. Louis Cardinals' Kolten Wong, right, and Miles Mikolas, left, dump water onto Paul Goldschmidt after he hit the game-winning home run during the 11th inning of a baseball game against the Miami Marlins, Wednesday, June 19, 2019, in St. Louis. The Cardinals won 2-1. (AP PhotoL.G. Patterson)

St. Louis loaded the bases with none out in the 10th, but Sergio Romo escaped for Miami. He struck out Harrison Bader and got Marcell Ozuna to ground into an 8-4-3 double play started by center fielder JT Riddle as part of a five-man infield.

Cardinals starter Daniel Ponce de Leon gave up two hits over six shutout innings and was in line to earn his first major league win before Rojas' single tied it.

Ponce de Leon struck out six and walked one in the longest of his three starts this season. It was the first time the right-hander did not allow a run in nine career starts.

St. Louis Cardinals celebrate Paul Goldschmidt's game-winning home run in a baseball game against the Miami Marlins, Wednesday, June 19, 2019, in St. Louis. The Cardinals won 2-1 in 11 innings. (AP PhotoL.G. Patterson)

St. Louis Cardinals celebrate Paul Goldschmidt's game-winning home run in a baseball game against the Miami Marlins, Wednesday, June 19, 2019, in St. Louis. The Cardinals won 2-1 in 11 innings. (AP PhotoL.G. Patterson)

John Gant (7-0) got the win with a perfect inning.

Miami has lost three of four.

Marlins right-hander Trevor Richards, from Aviston, Illinois — 40 miles east of St. Louis — went 5 2/3 innings before leaving after 108 pitches. He tied a season high with eight strikeouts and gave up three hits while walking three.

St. Louis Cardinals starting pitcher Daniel Ponce de Leon delivers during the first inning of a baseball game against the Miami Marlins, Wednesday, June 19, 2019, in St. Louis. (AP PhotoL.G. Patterson)

St. Louis Cardinals starting pitcher Daniel Ponce de Leon delivers during the first inning of a baseball game against the Miami Marlins, Wednesday, June 19, 2019, in St. Louis. (AP PhotoL.G. Patterson)

Richards pitched around a pair of walks in the third, but couldn't get out of more trouble in the sixth. Fowler's single, the third hit of the inning, snapped a 14-inning scoreless drought for the Cardinals and ended Richards' night as he left to boisterous applause from his hometown cheering section.

ON THE BOARD

Rangel Ravelo started in Goldschmidt's spot at first base and got his first major league hit in the sixth.

St. Louis Cardinals first base coach Stubby Clapp sprays himself with bug spray during the fifth inning of the team's baseball game against the Miami Marlins, Wednesday, June 19, 2019, in St. Louis. (AP PhotoL.G. Patterson)

St. Louis Cardinals first base coach Stubby Clapp sprays himself with bug spray during the fifth inning of the team's baseball game against the Miami Marlins, Wednesday, June 19, 2019, in St. Louis. (AP PhotoL.G. Patterson)

BIG FISH

Don Mattingly managed his 556th game on the Marlins bench, passing Fredi González for most in franchise history.

ROSTER MOVES

Miami acquired OF César Puello from the Angels for cash, and utilityman Rosell Herrera was designated for assignment. Puello grounded out as a pinch-hitter in the eighth.

Miami Marlins' Jorge Alfaro, left, scores past St. Louis Cardinals catcher Matt Wieters during the eighth inning of a baseball game Wednesday, June 19, 2019, in St. Louis. (AP PhotoL.G. Patterson)

Miami Marlins' Jorge Alfaro, left, scores past St. Louis Cardinals catcher Matt Wieters during the eighth inning of a baseball game Wednesday, June 19, 2019, in St. Louis. (AP PhotoL.G. Patterson)

TRAINER'S ROOM

Marlins: RHP Pablo López (right shoulder strain) was placed on the 10-day injured list and LHP José Quijada was recalled from Triple-A New Orleans. ... 1B Garrett Cooper was a late scratch with a sore left triceps and was replaced in the lineup by Yadiel Rivera.

Cardinals: INF Yairo Muñoz is expected to be activated from paternity leave Thursday.

Miami Marlins' Starlin Castro watches a pop fly above his head during the second inning of a baseball game against the St. Louis Cardinals, Wednesday, June 19, 2019, in St. Louis. (AP PhotoL.G. Patterson)

Miami Marlins' Starlin Castro watches a pop fly above his head during the second inning of a baseball game against the St. Louis Cardinals, Wednesday, June 19, 2019, in St. Louis. (AP PhotoL.G. Patterson)

UP NEXT

Marlins: Zac Gallen makes his major league debut Thursday night in St. Louis against his former organization. The 23-year-old righty was 9-1 with a 1.77 ERA at Triple-A New Orleans, striking out 112 in 91 1/3 innings. He was traded by the Cardinals to Miami in the deal for Ozuna after the 2017 season.

Cardinals: Plan to reinstate veteran right-hander Adam Wainwright (5-6, 4.46 ERA) from the injured list in the finale of a four-game series. Wainwright strained his left hamstring running the bases June 9. He has two shutouts in 11 career starts against Miami.

Miami Marlins starting pitcher Trevor Richards delivers during the first inning of a baseball game against the St. Louis Cardinals, Wednesday, June 19, 2019, in St. Louis. (AP PhotoL.G. Patterson)

Miami Marlins starting pitcher Trevor Richards delivers during the first inning of a baseball game against the St. Louis Cardinals, Wednesday, June 19, 2019, in St. Louis. (AP PhotoL.G. Patterson)

More AP MLB: https://apnews.com/MLB and https://twitter.com/AP_Sports