New York Yankees' Giancarlo Stanton, front right, celebrates a solo home run with teammate Didi Gregorius (18) during the ninth inning of a baseball game against the New York Mets, Friday, June 8, 2018, in New York. (AP Photo/Adam Hunger)
New York Yankees' Giancarlo Stanton, front right, celebrates a solo home run with teammate Didi Gregorius (18) during the ninth inning of a baseball game against the New York Mets, Friday, June 8, 2018, in New York. (AP Photo/Adam Hunger) Credit: Adam Hunger

New York — Brett Gardner hit a tiebreaking two-run homer off Jacob deGrom on an eighth-inning changeup, and the New York Yankees beat the reeling New York Mets, 4-1, on Friday night in the Subway Series opener after losing Masahiro Tanaka to hamstring problems when the pitcher sprinted home to score his first major league run.

Tanaka allowed one hit, a home run into the second deck in right by Brandon Nimmo on his second pitch. The 29-year-old right-hander scored standing up on Aaron Judge’s sacrifice fly, then was replaced before the bottom of the sixth. The Yankees said Tanaka had tightness in both hamstrings.

Gardner’s home run, his fifth this season and fourth in his last 21 games, went just over the wall in right-center and followed Gleyber Torres’ second single off deGrom (4-1). Giancarlo Stanton added a ninth-inning homer off Paul Sewald, his 22nd at Citi Field — the most among visiting players.

Jonathan Holder, Chad Green (4-0), Dellin Betances each pitched an inning, and Aroldis Chapman finished the four-hitter for his 16th save in 17 chances.

Indians 4, Tigers 1

Detroit — Jason Kipnis hit a tiebreaking, three-run homer in the ninth inning to lead Cleveland past Detroit.

Jose Ramirez almost broke the tie earlier in the ninth, hitting Shane Greene’s 3-1 pitch just past the foul pole down the right-field line, but ended up drawing a walk. Yonder Alonso singled with two outs.

Kipnis connected off Greene (2-3) for a drive over the right-center field scoreboard for his fourth homer of the season.

Cubs 3, Pirates 1

Chicago — Kris Bryant had three hits and scored a run while batting leadoff for the first time in his career, Ian Happ made a spectacular diving catch near the left-field corner to end the game and surging Chicago beat slumping Pittsburgh.

Bryant singled in his first three at-bats and scored in a two-run first inning, helping the Cubs win for the 10th time in 12 games.

Blue Jays 5, Orioles 1

Toronto — J.A. Happ allowed two hits in seven innings to earn his 100th career victory, Russell Martin homered and drove in two runs and Toronto beat Baltimore to win consecutive games for the first time in more than a month.

Randal Grichuk and Kevin Pillar also homered as the Jays recorded their first back-to-back victories since April 30 and May 1 at Minnesota.

Mariners 4, Rays 3

St. Petersburg, Fla. — Marco Gonzales won his fourth straight start and Seattle beat Tampa Bay for the team’s 16th win in 20 games.

Gonzales (7-3) pitched into the eighth inning, leaving the game after taking a throw at first base too late to retire a sliding Mallex Smith. Christian Arroyo had a solo homer in the fifth and C.J. Cron added a two-run shot in the eighth off former teammate Alex Colome to pull the Rays within a run.

Giants 9, Nationals 5

Washington — Washington pitcher Stephen Strasberg exited after two innings because of tightness in his right shoulder, and San Francisco had eight extra-base hits.

Strasburg (6-6) gave up three runs and five hits.

Brewers 12, Phillies 4

Philadelphia — Ryan Braun homered twice and drove in five runs, and Milwaukee busted out of an offensive funk to beat Philadelphiaand snap a three-game losing streak.

Braun, who came in batting .229, hit a three-run shot off Vince Velasquez (4-7) in the first inning and a two-run blast off Mark Leiter Jr. in a six-run fourth that made it 11-0.

Marlins 4, Padres 0

Miami — Caleb Smith pitched into the sixth inning and had an RBI single for his first career hit to help Miami beat San Diego.

Smith (5-6) gave up four hits and two walks while striking out five in 5 1/3 innings. Brad Ziegler pitched 1 2/3 innings, and Drew Steckenrider and Kyle got three outs each to finish the shutout.

Brian Anderson had three hits and Cameron Maybin had two for the Marlins, who have won three of four. Eric Lauer (2-4) allowed three runs amd six hits and walked seven in five innings.