ST. LOUIS (AP) Derek Dietrich is going to need a new nickname.
Dietrich drove in three runs, Dee Gordon had three hits, and the Miami Marlins broke a six-game losing streak against St. Louis with a 6-4 victory over the Cardinals on Sunday.
Adeiny Hechavarria had two hits and scored two runs as Miami won for the fourth time in six games.
Dietrich entered with an odd stat line of seven homers and 11 RBIs in 51 games this season. His teammates jokingly called him ''Seven-Eleven Man,'' due to the quirky totals.
''I got the guys teasing me about that,'' he said. ''But, I was just trying to have quality at-bats with guys on base. Hopefully, I can just keep that going.''
Jason Heyward homered twice and drove in three runs for St. Louis, which sports the best home record in the majors at 44-18. Stephen Piscotty also went deep for his first major league homer.
The Cardinals had a 3-1 lead before the Marlins scored four times in the fifth. The big blow was a bases-loaded triple for Dietrich, who had just one homer and three RBIs for the month coming into the day.
''He came through for us, we definitely needed that,'' Gordon said.
Chris Narveson (1-0) pitched 2 2-3 innings for the win. He also drove in Hechavarria with a squeeze bunt in the fifth. Hechavarria was first called out, but the play was overturned after a 2 minute, 50 second replay review.
A.J. Ramos pitched the ninth for his 19th save in 24 opportunities.
An error by St. Louis second baseman Kolten Wong and a single from Gordon set up Dietrich's big triple down the right-field line.
''When you beat those guys you've got to earn it,'' manager Dan Jennings said. ''I thought we played an outstanding game. A tremendous job by the bullpen.''
Miami starter David Phelps left in the third with right elbow stiffness and will be placed on the disabled list on Monday.
''We're going to send him back to Miami,'' Jennings said. ''He'll have it tested down there.''
Carlos Martinez (12-5) pitched five innings for St. Louis, allowing five runs, one earned, and seven hits.
Heyward connected in his first two at-bats against Phelps for his sixth career multihomer game and his first since Aug. 17, 2013 for Atlanta at Washington. Heyward's last four homers have come against Miami.
''It was a good start, it got us some runs early,'' Heyward said. ''I'm just trying to keep it simple and get some good swings on some pitches.''
The Cardinals, who lead Pittsburgh by five games in the NL Central, won their first five games between the teams this season and also won the last final regular-season contest against Miami last year.
Marlins: RHP Jarred Cosart will pitch in a simulated game on Monday. If all goes well, he will head out on a rehabilitation assignment. Cosart has been slowed by vertigo.
Cardinals: OF Randal Grichuk left in the eighth inning with an elbow injury. He will be examined on Monday. ''We need a closer look to make sure it is something he can play though,'' manager Mike Matheny said.
Marlins: LHP Justin Nicolino (1-1, 4.86 ERA) will face Brewers RHP Matt Garza (6-12, 4.82 ERA) in the opener of a three-game series in Milwaukee on Monday. Nicolino is making his fourth major league start.
Cardinals: RHP Michael Wacha (14-4, 2.93 ERA) takes on San Francisco RHP Chris Heston (11-7, 3.38 ERA) in the opener of a three-game set on Monday. Wacha is tied for the NL lead in wins.