NEW YORK -- Brett Gardner led off the bottom of the 11th inning with the game-winning homer as the New York Yankees outlasted the Tampa Bay Rays 6-5 in the opener of a four-game series Thursday night.
Gardner gave the Yankees a fourth straight win when he slugged a 1-1 pitch from Andrew Kittredge (0-1) over the right field fence as the game approached the four-hour mark.
It was his career-high 18th homer and his third career walk-off homer. Gardner's previous game-ending blast came on April 23, 2016, off Tampa Bay's Erasmo Ramirez.
The late heroics were made possible when Yankees catcher Gary Sanchez hit the game-tying single with two outs in the ninth. His ground ball got in between second baseman Tim Beckham and shortstop Adeiny Hechavarria after Beckham hesitated for a second, and Gardner scored on the play.
Before taking a major-league-worst 32nd loss after holding a lead at some point, Tampa Bay grabbed a lead on pinch hitter Brad Miller's two-run double in the fifth and went up 5-3 on Corey Dickerson's solo homer in the sixth.
Those hits occurred off Chad Green, but four more New York relievers followed with four scoreless innings, and Aroldis Chapman (3-1) pitched two perfect innings.
New York, which blew an early 3-0 lead, made it a one-run game in the eighth on pinch hitter Matt Holliday's RBI groundout against Brad Boxberger.
Evan Longoria started Tampa Bay's comeback with his eighth career homer off CC Sabathia in the fourth. Peter Bourjos hit an RBI double off Sabathia in the sixth before the Rays took the lead.
Archer allowed three runs on seven hits and two walks in six innings. He struck out 10, including Frazier and Tyler Wade with the bases loaded to finish his outing.
Sabathia allowed four runs and five hits in 4 1/3 innings.
NOTES: Tampa Bay made a pair of trades, acquiring LHP Dan Jennings from the Chicago White Sox and 1B Lucas Duda from the New York Mets. Duda is expected to join the Rays in time for the Friday game. The Rays designated RHP Diego Moreno and OF Shane Peterson for assignment to make room for their new players. ... Yankees manager Joe Girardi said OF Aaron Hicks (strained right oblique) and 1B/OF Tyler Austin (strained right hamstring) would begin rehab assignments when New York starts its next road trip Aug. 4 in Cleveland. ... Girardi was ejected for arguing balls and strikes by plate umpire Stu Scheurwater after objecting to a called strike one by RHP Sergio Romo to RF Aaron Judge. It was Girardi's third ejection of the season and 33rd since becoming New York's manager in 2008.