ARLINGTON, Texas -- On a night the mostly comatose Yankees offense exploded, a mostly standout pitching staff imploded.
Still, the Yankees hung on for what was at times an unsightly 12-11 victory over the Rangers in front of 41,934 at Globe Life Park.
"It would have been a really difficult one to lose," Joe Girardi said in an understatement.
The Rangers, who trailed 10-4 and 12-8, pulled to 12-9 in the eighth before almost completing the comeback. They scored twice against an erratic David Robertson, who allowed two hits and three walks in the ninth. With runners on first and second, Robertson walked Alex Rios, bringing the dangerous Adrian Beltre to the plate. Robertson got ahead 0-and-2 but Beltre worked it to 3-and-2 before flying to Brett Gardner at the edge of the track in left for his 27th save in 29 chances.
"That's about as bad as you can [stink] out there and still get lucky enough to get one of the better hitters in baseball out and not lose the ballgame," Robertson said. "I feel like the luckiest guy to escape that inning as bad as I pitched."
On contact Girardi said, "I was a little worried," and Gardner was as well -- before the at-bat. "He's a scary hitter," Gardner said of Beltre. "I'm always concerned when he comes to the plate."
The Rangers must feel that way about Gardner, who picked up where he left off Monday night.
Gardner, 3-for-5 with two homers Monday, led off Tuesday night with a homer against Nick Martinez and finished 4-for-5, including two doubles. Carlos Beltran had two hits and two RBIs, Derek Jeter added two hits and Mark Teixeira provided insurance in the seesaw game, hitting a two-run homer in the eighth that made it 12-8.
The bullpen, so good this season, did not have it and, for a change, the offense did.
The Yankees (55-51) rallied with a seven-run sixth to take an 8-4 lead and eventually pushed it to 10-4. But the Rangers (42-65) climbed to 12-10 in the seventh on a grand slam by J.P. Arencibia, who went 4-for-5 with two homers and seven RBIs.
It was the first time the Yankees, who remain 4 ½ games behind the first-place Orioles in the AL East, scored 10 or more runs since scoring 14 April 24 at Boston.
"Give 'em one hiccup," Teixeira said of the bullpen. "Let them have a hiccup because they've been picking us up all year long and we haven't been picking them up. So it was kind of our night for the offense to pick those guys up."
Brandon McCarthy was not nearly as good as in his first three starts with the Yankees. But he still gave them six innings, allowing four runs and nine hits.
Gardner had a leadoff double in the Yankees' most impressive offensive inning of the season, in which they sent 11 to the plate and erased a 4-1 deficit.
Adam Warren started the seventh and walked Elvis Andrus, then allowed a single to Rios, eventually giving way to Dellin Betances with one out and the bases loaded, and the suddenly resurgent Arencibia at the plate.
With the count full, he hit Betances' 97-mph fastball into the seats in left to make it 10-8.
"I think it was up but he's been putting some good swings against us and he was able to hit that ball a long way," Betances said. "But just being able to win the game I think for us in the bullpen, it makes us feel better. It was definitely tough today but a win changes everything."