CINCINNATI: Matt Carpenter tied the game with a solo homer in the eighth and Randal Grichuk connected in the 13th to lead the league-leading St. Louis Cardinals to a 4-3 victory over the Cincinnati Reds in Major League Baseball on Wednesday.

Grichuk was moved up to second in the Cardinals’ struggling batting order. He doubled home a run in the sixth inning and hit his 15th homer in the 13th off Dylan Axelrod (0-1), Cincinnati’s eighth pitcher.

Seth Maness (4-1) gave up a pair of walks in two innings.

Carpenter tied it with a homer in the eighth off J.J. Hoover, only the third that the reliever has allowed this season. It was Carpenter’s fifth homer in his last six games.

In other games Wednesday, the New York Mets halted Miami’s furious six-run rally in the ninth inning and held on for an 8-6 victory, Chris Gimenez hit the deciding home run as Texas completed a three-game sweep of AL West-leading Houston with a 4-3 win, and Pittsburgh ended the Chicago Cubs’ season-best six-game winning streak with a 7-5 victory.

Ahead 8-0 going into the ninth, the NL East-leading Mets saw the Marlins actually bring the potential winning run to the plate. But Mets closer Jeurys Familia retired Christian Yelich on a grounder with two runners on to end it.

Juan Uribe hit a three-run homer and Lucas Duda drove in three runs, giving Matt Harvey (10-7) a huge lead. Harvey pitched seven dominant innings, giving up two hits and striking out six without a walk.

New York got its sixth straight victory.

The Rangers have won four in a row and seven of eight, moving within five games of the AL West division lead, the closest they have been since June 30.

After Texas scored three unearned runs in the first inning off Scott Kazmir (6-6), the Rangers’ second started with Gimenez homering to straightaway center for a 4-0 lead. All three Houston runs were scored by players who reached on a walk.

Texas starter Nick Martinez (7-6) walked three and struck out one while throwing 86 pitches in blistering heat.

In Pittsburgh, Gregory Polanco and Andrew McCutchen homered to help the Pirates win for the 12th time in their last 15 home games at PNC Park.

Polanco led off the first inning with a home run off Dan Haren, who was making his Cubs’ debut. He then hit an RBI single to break a 4-4 tie in a decisive two-run sixth.

McCutchen hit a solo homer in the third and added a sacrifice fly in the sixth to make it 6-4.

Elsewhere, C.J. Cron hit a tying two-run single with two out and the bases loaded in the ninth inning against Cleveland closer Cody Allen and pinch-runner Taylor Featherston scored on a wild pitch, giving the Los Angeles Angels a 4-3 victory.

The Angels came in 0-44 when trailing after eight.

Washington reliever Aaron Barrett threw away a bunt in the sixth inning and Arizona quickly broke away, beating the Nationals 11-4. Washington lost for the fifth time in six games and dropped two games behind the Mets in the NL East division.

Chris Davis hit his second grand slam in 12 days with one out in the 10th inning to lead Baltimore past Oakland 7-3. Davis hit his 28th home run and third in four games on a 3-2 pitch from Arnold Leon (0-1).

Steven Wright handcuffed a torrid New York Yankees lineup with his steady supply of knuckleballs, and David Ortiz hit a colossal home run to give Boston a 2-1 win.

In Toronto, Jose Bautista hit a grand slam, Edwin Encarnacion and Josh Donaldson homered as the Blue Jays beat Minnesota 9-7 for their fourth straight win.

Also, the Los Angeles Dodgers topped Philadelphia 4-3, San Francisco beat Atlanta 6-1, the Chicago White Sox rallied past Tampa Bay 6-5 in 10 innings, Colorado defeated Seattle 7-5, Milwaukee beat San Diego 8-5, and Detroit defeated Kansas City 2-1.