Updated

Miami, FL (SportsNetwork.com) - Giancarlo Stanton's RBI single in the bottom of the 10th inning made the Miami Marlins 4-3 winners over the Texas Rangers on Tuesday.

Mike Carp's error allowed Jeff Baker to reach base safely with one out in the 10th. After Christian Yelich lined out for the second out, Donovan Solano extended the inning with an infield single.

Neftali Feliz then replaced Neal Cotts (2-7) on the mound to pitch to Stanton, but the move backfired, as the MVP candidate laced a single into right, plating Baker for the game-winning run without a throw.

"We had the right guy there," said Marlins manager Mike Redmond. "He had a heck of an at-bat and hit a bullet to right."

The walk-off single was Stanton's fifth career game-winning hit.

Yelich had three hits for Miami, which got an RBI from four different players to surpass its 2013 win total with 37 games left in the season. Marcell Ozuna homered for the 17th time this season.

Jarred Cosart turned in six innings of one-run ball, and Sam Dyson (2-0) struck out the side in the top of the 10th to pick up the win.

Miles Mikolas also earned a no-decision in his start for Texas, exiting after five-plus innings. Mikolas gave up three runs on eight hits while fanning six.

"I maybe tried to get a little too contact friendly with two outs and try to get out of there quick," Mikolas said. "It kind of backfired. I got the pitch count up."

Both teams broke through in the fourth inning. Adrian Beltre doubled with one out in the top of the frame and moved to third on Leonys Martin's single two batters later. Martin was forced out at second on Robinson Chirinos' groundout, but Beltre scored to make it 1-0 as Chirinos beat out the relay to first.

Ozuna's solo homer with two outs a half inning later knotted the score.

Mikolas had allowed five hits over his first five innings, but a rough start to the home sixth spelled the end of his outing. Garrett Jones doubled and Ozuna singled to put runners on the corners for Jarrod Saltalamacchia, whose base knock to right gave the Marlins a lead.

Roman Mendez replaced Mikolas and gave up a sacrifice fly to Adeiny Hechavarria before getting out of the inning.

Cosart departed with a 3-1 lead, but it quickly disappeared in the seventh inning as A.J. Ramos was unable to record the hold. Rougned Odor doubled to lead off the inning and scored on Stanton's error in right field. Ramos then walked two around a Shin-Soo Choo single and left with the bases loaded. Mike Dunn came on and walked pinch-hitter Daniel Robertson to force in the tying run.

Game Notes

Cosart is unbeaten in three starts against the Rangers this season ... Texas went just 1-for-10 with runners in scoring position and stranded 12. Miami left 15 on base ... Both teams had three errors.