Jose Urena finally got his first win of the season as Brian Anderson and J.T. Riddle homered to back Urena, and the Marlins stopped a six-game losing streak with a 7-4 victory Tuesday night over the St. Louis Cardinals.
Anderson had a two-run homer and two singles for Miami, which had lost nine of 10.
Urena (1-7) pitched five innings, allowing 10 hits and four runs for his first win in 13 starts this season. Miami lost his previous 14 overall - a dubious team record - dating back to Sept. 26 last year. Urena started on opening day this season but his last win came on Sept. 20, 2017.
Kyle Barraclough pitched the ninth for his second save.
In getting swept last weekend, the Marlins allowed 21 runs at Arizona and scored only four times. Miami entered the St. Louis series 1-6 on this road trip with a minus-22 run differential.
The Cardinals returned their opening day battery from the 10-day disabled list for the series opener, with right-hander Carlos Martinez and catcher Yadier Molina coming back from injuries.
Martinez wasn't sharp while making his first start in four weeks since straining his right lat muscle in a May 8 loss to Minnesota. The right-hander threw 75 pitches in four innings, snapping a string of 65 straight starts in which he pitched into the fifth, dating back to 2016.
He allowed four hits and two runs with five walks and five strikeouts but was helped by three double plays.
Preston Guilmet (0-1) made his Cardinals debut after they called him up Tuesday from Triple-A Memphis. It was a forgettable one inning of work.
It was the first time St. Louis lost this season with 12 or more hits.
In his first game against his former team, St. Louis outfielder Marcell Ozuna went 3 for 4 with an RBI. In his last four games, Ozuna has gone 8 for 14, including a milestone 100th home run and grand slam, with six RBIs.
The Marlins scored three runs off Guilmet for a 5-2 lead in the fifth. Derek Dietrich scored on a sacrifice fly by Justin Bour. Anderson hit a two-run homer that just cleared the fence in right field to score J.T. Realmuto.
St. Louis got two runs back in the fifth. Tommy Pham drove in a run with a bases-loaded fielder's choice. Ozuna followed with a run-scoring single, but Urena picked Pham off third and got a groundout to end the inning.
Miami added two runs off reliever Austin Gomber in the sixth to make it 7-4. Riddle led off with a homer and J.B. Shuck scored on a sacrifice fly by Dietrich.
St. Louis took a 1-0 lead in the second when Ozuna ran through a stop sign at third to score on a single to left by Molina.
Miami scored twice in the third. Starlin Castro scored on a double play and Dietrich came home on Anderson's infield single that hit Martinez's glove and glanced off his shoulder.
The Cardinals made it 2-all in their half of the third. Matt Carpenter scored when Pham hit into a double play.
LHP Wei-Yin Chen (1-3, 6.10 ERA) makes his second career start at St. Louis and first since July 16, 2016. RHP Jack Flaherty (2-1, 2.62) faces Miami for the first time.