ARLINGTON -- Josh Hamilton hit a single through the right side with two outs in the ninth off reliever Andrew Miller to bring home Leonys Martin with the winning run in the Rangers' 7-6 walk-off victory over the Yankees on Thursday night.
Hamilton, who had a three-run home run in the first inning, was mobbed at first base after the Rangers celebrated their second straight win over the Yankees.
"That's one of the funnest things you can do in baseball," Hamilton said. "I think having a team, you turn first base and look back and your teammates are running out to give you hugs and jump around with you and act crazy, it's a pretty cool feeling. Hopefully we can take the momentum from that and continue to have a good homestand."
Each team hit three home runs. Mark Teixeira hit two and Brian McCann hit one for the Yankees. Hamilton and Shin-Soo Choo went deep for the Rangers, while Ryan Rua circled the bases with the Rangers' first inside-the-park home run in almost two years.
Two veteran starters struggled in the heat. The Yankees' CC Sabathia allowed five runs in five innings, giving up nine hits and a walk while striking out three. The Rangers' Yovani Gallardo went six innings and allowed five runs on eight hits, two walks and a strikeout.
MOMENTS THAT MATTERED Run, Rua, run: Rua hit an inside-the-park home run in the fourth when Jacoby Ellsbury missed a diving catch on his line drive to center. It was the Rangers' 25th inside-the-park home run, and first since Ian Kinsler on Aug. 23, 2013. The last Yankees pitcher to give up an inside-the-park home run to the Rangers was Ken Clay on Aug. 27, 1977. That was the game in which Toby Harrah and Bump Wills hit back-to-back ones.
"That's one of the more fun plays in baseball if you are on the positive side," Rangers manager Jeff Banister said. "When he was on second base, everybody in the ballpark was yelling for him to go."
"I got a good bead on it, and then it pretty much just divebombed," Ellsbury said. "At that point, you're obviously trying to make the catch, but you're really trying to block it or do whatever you can to keep it in front of you." More >
Tex muscles up: Teixeira gave the Yankees a late lead with his second homer of the game, a solo shot to straightaway center field off Keone Kela in the seventh inning. It marked the 40th career multi-homer game for Teixeira, who also launched one off Gallardo as part of the Yanks' three-run first inning. Teixeira has 26 homers, and along with McCann and Alex Rodriguez, has helped make the Yankees the first team in the Majors this year to have three players with 60 or more RBIs.
Martin hits DeShields: The Rangers had Delino DeShields on first with one out in the ninth. Martin hit a wicked line drive that was heading to right field. But the ball hit DeShields. The rule states DeShields was out and Martin was on first with a single. The Rangers still scored. Adrian Beltre's walk preceded Hamilton's game-winning hit.
"Delino is OK," Banister said. "He got clipped a little bit. The ball hit him hard. It got on him quick. He probably winds up at third base. It's a reaction play. There is nothing he could have done."
Slamming the door in the seventh: With the Yankees calling upon Dellin Betances for a multi-inning appearance in the seventh, the Rangers tied the game on Prince Fielder's fielder's-choice grounder -- a play on which shortstop Didi Gregorius was shaken up by Elvis Andrus' slide. Andrus stole third, but Betances managed to stomp out the threat, getting Beltre to pop out and -- after a walk to Hamilton -- striking out pinch-hitter Mitch Moreland on a nasty slurve in the dirt.
"Those are things you create momentum with. Coming back and fighting hard. I think I looked up once and the score was 6-6 and both teams had 10 hits. It was a fun ballgame to be a part of." -- Hamilton, on the Rangers' win
"I just didn't fool anybody tonight. It was just one of those days. Even the outs I got, both outs were two of the hardest-hit balls I've given up all year. You chalk it up and move on. You're not going to win them all. It stinks. I feel like I'm throwing the ball pretty well, but I didn't get the result I wanted tonight." -- Miller
The Yankees switched starters on Thursday, plugging in Sabathia for injured right-hander Michael Pineda. The change did not catch the Rangers off-guard. Manager Jeff Banister said the Rangers prepare for all opposing pitchers, not just the ones scheduled to pitch. He also said that Yankees manager Joe Girardi let him know well ahead of time of the change.
"Joe did the appropriate thing," Banister said. "We were well-informed."
WHAT'S NEXT Yankees: The Yankees head to Chicago to open a three-game series with the White Sox, and right-hander Nathan Eovaldi will pitch for the Yankees at 8:10 p.m. ET on Friday at U.S. Cellular Field. Eovaldi is 5-0 with a 2.83 ERA in his last seven starts.
Rangers:Nick Martinez pitches for the Rangers when they open a three-game series against the Giants at 7:05 p.m. CT on Friday. Martinez is 0-4 with a 7.01 ERA in last six starts. The Giants haven't played in Arlington since the World Series in 2010. Their last regular-season game here was in 2001.