Updated

ST. LOUIS (AP) -- Christian Yelich hit a three-run homer, Jose Urena struck out seven in five solid innings and the Miami Marlins beat the St. Louis Cardinals 5-2 on Tuesday.

JT Riddle added a two-run single for the Marlins, who had dropped five of six. Dee Gordon had three hits, and Giancarlo Stanton reached three times.

Greg Garcia hit a two-run homer for St. Louis, which lost for just the second time in seven games. Matt Carpenter had two hits.

Urena (7-3) was charged with two runs and three hits. Drew Steckenrider, Kyle Barraclough and David Phelps each pitched a scoreless inning before AJ Ramos finished for his 14th save in 15 opportunities.

The Cardinals jumped in front on Garcia's second homer of the season in the fifth. But the Marlins responded with five in the sixth.

Gordon doubled with one out and Stanton reached on a throwing error on second baseman Carpenter before Yelich hit a drive to center for his first homer since June 2. Riddle tacked on his big single with two out.

Miami broke a four-game losing streak in St. Louis.

GOING IN REVERSE

St. Louis outfielder Tommy Pham went 0 for 4 and struck out four times after reaching base in all five trips to the plate in Monday's 14-6 win. He went 3 for 3 and walked twice.

IN A PINCH

St. Louis pinch hitters lead the majors with a .348 average (40 for 115). Jose Martinez has a team-high six pinch hits in 14 at bats. Rookie Luke Voit is 3 for 3.

GONE

Marlins left-hander Jeff Locke was designated for assignment after giving up 11 earned runs in 2 2/3 innings of Monday's loss at St. Louis. Locke was 0-5 with an 8.16 ERA in seven starts. Steckenrider was recalled from Triple-A New Orleans.

TRAINER"S ROOM

Cardinals: INF Jedd Gyorko was held out of the starting lineup after leaving Monday's game in the fifth inning with a cramping issue. … INF Kolten Wong will begin a rehab assignment with Double-A Springfield on Wednesday. Wong was placed on the 10-day disabled list on June 15 with a triceps injury.

UP NEXT

Cardinals right-hander Mike Leake (6-6, 2.97 ERA) will take on Miami right-hander Edinson Volquez (4-8, 3.97 ERA) in the third game of the four-game series on Wednesday. Leake is 6-1 with a 2.36 ERA in seven career starts against the Marlins. Volquez tossed a no-hitter against Arizona on June 3.