Updated

Hanley Ramirez hit a game-tying two-run home run in the in the bottom of the eighth and added the winning single with the bases loaded in the 11th, lifting the Marlins to a 5-4 victory over the Astros in the finale of a three-game series at Marlins Park on Sunday.

Houston left the bases loaded in the top of the 11th, but the Marlins took full advantage of their opportunity in the bottom half.

Pinch-hitter John Buck hit a leadoff single and pinch-runner Brett Hayes moved to second on Chris Coghlan's sacrifice bunt before back-to-back intentional walks loaded the bases for Ramirez.

Ramirez then sent a 1-2 offering from David Carpenter (0-1) over the head of right fielder Travis Buck to complete the extra-inning victory.

All three games in the series ended 5-4, with the Marlins taking the first and third, each in walk-off fashion in the 11th inning.

Chad Gaudin (1-0) pitched three scoreless innings in relief, allowing two hits and two walks. Logan Morrison had three hits and knocked in a run while Anibal Sanchez surrendered three runs -- two earned -- on five hits with three walks and seven strikeouts in a six-inning start.

Wilton Lopez served up the eighth-inning two-run homer to Ramirez after starter J.A. Happ was lifted after giving up two runs on five hits while striking out eight over six innings. Jose Altuve finished with two hits and two RBI while Brian Bogusevic also had two hits and scored twice.

The Marlins opened the scoring in the second as Omar Infante belted a leadoff homer over the wall in left field, giving Miami its first home run at Marlins Park and activating the ostentatious display out in left-center field for the first time.

Houston got a run back in the third as Sanchez' leadoff walk to Happ came back to haunt him when Happ came around to score three batters later after J.D. Martinez lifted a double to left-center field, knotting the game at 1-1.

Bogusevic and Chris Johnson opened the fourth with back-to-back singles, putting runners on the corners with no outs for the Astros. Jason Castro followed with a tailor-made double-play ball, but it snuck under the legs of Infante at second base to score Bogusevic and again put runners on the corners with no outs.

Altuve then plated Johnson with a fielder's choice to shortstop, making it 3-1 in favor of the visitors.

Miami got one back in the fourth as Giancarlo Stanton scorched a one-out double off the base of the wall in left field and came around to score on Morrison's single to right field to pull the Marlins within 3-2.

Houston added another run in the eighth as Bogusevic led off the frame with a single. After consecutive strike outs, Altuve roped a double into the left- center field gap, scoring Bogusevic to extend the lead to 4-2.

Wesley Wright entered in the eighth for Fernando Rodriguez but quickly exited after walking Emilio Bonifacio to start the inning. Lopez replaced Wright and Ramirez sent his third offering over the wall in deep center field to tie the game at 4-4.

Game Notes

On this the 65th anniversary of Jackie Robinson breaking the color barrier Major League Baseball is commemorating this special occasion by having all players and on-field personnel once again wear the Hall of Famer's No. 42 in addition to other pregame festivities...Houston finished 0-for-9 with runners in scoring position and left 13 men on base. Miami stranded 12 men and went 2- of-r9 with RISP...The Marlins will start a three-game series with the Cubs in Miami on Tuesday while the Astros head to Washington for a four-game set starting on Monday.