Sandoval's tie-breaking single lifts Giants in 16 innings

San Francisco Giants' Pablo Sandoval, right, watches after hitting an RBI single to score two runs during the 16th inning of a baseball game against t

San Francisco Giants' Pablo Sandoval, right, watches after hitting an RBI single to score two runs during the 16th inning of a baseball game against t

San Francisco Giants relief pitcher Ty Blach is congratulated in the dugout after being relieved in the 16th inning of a baseball game against the Mia

San Francisco Giants relief pitcher Ty Blach is congratulated in the dugout after being relieved in the 16th inning of a baseball game against the Mia

San Francisco Giants' Andrew McCutchen hits a single during the sixth inning of a baseball game against the Miami Marlins, Thursday, June 14, 2018, in

San Francisco Giants' Andrew McCutchen hits a single during the sixth inning of a baseball game against the Miami Marlins, Thursday, June 14, 2018, in

Miami Marlins third base coach Fredi Gonzalez, left, shakes hands with JT Riddle as he rounds the bases on a solo home run during the fifth inning of

Miami Marlins third base coach Fredi Gonzalez, left, shakes hands with JT Riddle as he rounds the bases on a solo home run during the fifth inning of

Miami Marlins' Starlin Castro drops his bat after striking out swinging in the fourth inning of a baseball game against the San Francisco Giants, Thur

Miami Marlins' Starlin Castro drops his bat after striking out swinging in the fourth inning of a baseball game against the San Francisco Giants, Thur

San Francisco Giants' Andrew McCutchen hits a two-run home run during the first inning of a baseball game against the Miami Marlins, Thursday, June 14

San Francisco Giants' Andrew McCutchen hits a two-run home run during the first inning of a baseball game against the Miami Marlins, Thursday, June 14

San Francisco Giants' Andrew McCutchen is hugged by Alen Hanson (19) after hitting a two-run home run during the first inning of a baseball game again

San Francisco Giants' Andrew McCutchen is hugged by Alen Hanson (19) after hitting a two-run home run during the first inning of a baseball game again

Miami Marlins starting pitcher Dan Straily delivers during the first inning of a baseball game against the San Francisco Giants, Thursday, June 14, 20

Miami Marlins starting pitcher Dan Straily delivers during the first inning of a baseball game against the San Francisco Giants, Thursday, June 14, 20

San Francisco Giants starting pitcher Dereck Rodriguez delivers during the first inning of a baseball game against the Miami Marlins, Thursday, June 1

San Francisco Giants starting pitcher Dereck Rodriguez delivers during the first inning of a baseball game against the Miami Marlins, Thursday, June 1

MIAMI (AP) — Pablo Sandoval's tie-breaking two-run single in the 16th inning lifted the San Francisco Giants past the Miami Marlins, 6-3, on Thursday.

Andrew McCutchen hit a two-run homer to continue his torrid month and Mac Williamson also homered for the Giants, who salvaged the final game of a four-game series and beat the Marlins for only the second time in the last 10 meetings.

Giants' starter Dereck Rodriguez pitched 6 2-3 innings, allowing two runs with his father and former Marlins' World Series championship catcher Pudge Rodriguez sitting behind home plate. Ty Blach (4-5) also pitched 6 2-3 innings for the Giants without allowing a run. He gave up seven hits, walked two, and struck out three. Sam Dyson came on for Blach to get the final out with two runners on for his first save of the season.

McCutchen started the 16th with a single, Brandon Crawford walked and Alen Hanson singled to load the bases of Elieser Hernandez (0-4). Sandoval's single to center made it 5-3, and Gorkys Hernandez added a sacrifice fly later in the inning. The runs were the first for the Giants since the second.

Miami had two runners on in the bottom of the 16th for Bryan Holaday, who flew out to end the game.

It was the longest game of the season for the Giants and the second-longest for the Marlins, who went 17 innings in a 2-1 win over the Chicago Cubs on March 30.

Both teams had opportunities in extra innings after the Marlins tied the game in the bottom of the ninth off Hunter Strickland on a sacrifice fly by Lewis Brinson. Second baseman Joe Panik was unable to hold onto a pop up near the foul line, allowing the lead-off runner to reach.

It was the eighth time in the series the Marlins came back to tie the game.

The Giants looked to take the lead in the 11th on a double by Hanson, but Crawford was thrown out at the plate.

Miami threatened in the 13th when manager Bruce Bochy ordered an intentional walk to load the bases with two outs and Hernandez due to bat because the Marlins were out of position players. Hernandez bounced out to Blach.

The Marlins had another opportunity in the 15th with runners on the corners and one out, but Justin Bour grounded into a double play. Bour slammed his helmet to the ground in disgust.

McCutchen hit a two-run homer in the first inning for the second straight game. Five of his eight home runs have been this month. He went 3 for 7 to raise his batting average to .339 (19 for 56) in June, historically the best month of his career. He has 11 multi-hit performances in his last 18 games.

Williamson's fourth home run of the season gave the Giants a 3-0 lead against Dan Straily in the second inning.

JT Riddle's solo shot, his third, cut the deficit to 3-1 in the fifth.

Holaday's two-out base hit to left pulled Miami within 3-2 in the seventh, ending Rodriguez's outing.

Rodriguez scattered seven hits and struck out four in his third start.

SMITH EXPECTED TO GO ON BEREAVEMENT LIST

Miami's Caleb Smith was not with the club due to a funeral and is expected to go on the bereavement list. Manager Don Mattingly said Smith will make his next scheduled start at San Francisco on June 18.

HOLADAY'S STREAK CONTINUES

Holaday threw out Mac Williamson trying to steal second base in the fourth inning. It was the ninth consecutive base stealer Holaday has thrown out, extending his franchise record. The nine straight is the most in the majors since Arizona's Miguel Montero threw out nine in a row in 2011.

TRAINER'S ROOM

Giants: 3B Evan Longoria (left hand) was hit by a pitch in the fourth inning and stayed in the game briefly to run before being replaced in the field.

Marlins: RHP Brett Graves (left oblique) is nearing a return and the plan is for him to begin out of the bullpen.

UP NEXT

Giants: LHP Derek Holland (4-6, 4.54 ERA) will take the mound Friday to begin a three-game series at the Los Angeles Dodgers. The Giants are 6-4 against their rivals this season.

Marlins: RHP Jose Urena (1-8, 4.59) begins a three-game series at Baltimore on Friday.

___

More AP baseball: https://apnews.com/tag/MLBbaseball