NEW YORK -- J.P. Arencibia had one thought when he hit a home run to lead off the 13th inning and give the Rangers a one-run lead on Tuesday night.
"I thought the game was over," Arencibia said.
The Rangers certainly had reason to feel that way, needing just three outs from closer Joakim Soria to complete their 15th shutout of the season. But it didn't happen that way.
Soria took his second blown save of the season in the bottom of the 13th, and the Yankees closed it out on Chase Headley's run-scoring single in the 14th off starter-turned-reliever Nick Tepesch for a 2-1 victory.
"It was really disappointing, especially as well as we played," manager Ron Washington said. "We just couldn't shut it down. We didn't give up; they didn't, either."
Tepesch, who is supposed to start on Friday and probably still will, was pitching the 14th because Washington used up his entire bullpen in a game that was scoreless through 12 innings. The Rangers had warned Tepesch a couple of innings earlier that he might be needed.
"There were no other options," Washington said.
Tepesch had thrown a bullpen session early Tuesday afternoon to prepare for his next start, but he refused to use that as an excuse.
"I was ready," Tepesch said. "If I didn't feel I couldn't do it, I wouldn't have done it."
Tepesch retired Ichiro Suzuki on a grounder to start the 14th, then gave up a double to Brian Roberts. That brought up Francisco Cervelli, who punched a single through the right side, moving Roberts to third. With the infield in, Headley dropped a single into left-center field that brought to an end a game that lasted four hours, 51 minutes.
"That was painful, especially playing forever," shortstop Elvis Andrus said. "We had the game won, it seemed, a couple of times. But they were like us; they didn't give up, either. Crazy game. Pretty crazy. But I think both teams didn't give up. In the end, they had more luck than us."
Arencibia's home run came off of Yankees reliever David Huff. The Rangers also had two on with two out in the 14th inning, but Andrus flied out to right to end the inning. The Rangers finished the night 1-for-9 with runners in scoring position.
Soria was going for his 18th save. He had been successful on nine straight opportunities since his last blown save, on May 27 against the Twins.
Brett Gardner started the bottom of the 13th with a double down the right-field line. Derek Jeter bunted him to third, and Jacoby Ellsbury tied the game at 1 with a single to right.
"A huge rally off of Soria, too," Yankees manager Joe Girardi said. "We didn't do much the first, I don't know, 10, 11 innings. We didn't have many chances. I lost track. And we used our whole bullpen and they used their whole bullpen and ended up with a starter at the end."
Six Rangers relievers had combined to hold the Yankees scoreless for 6 2/3 innings until Soria gave up his run in the 13th.
"These always sting," said reliever Shawn Tolleson. "It was one of those games, a well-pitched game. I was really happy with the way everybody threw the ball."
Rangers starter Nick Martinez was terrific in his first outing off the disabled list. Pitching for the first time since July 1, Martinez silenced the Yankees for 5 1/3 innings. He allowed three hits and a walk while striking out three, leaving after 67 pitches.
"In the fourth ... fifth inning, he started breaking up with his mechanics and scattering the ball," Washington said of Martinez. "That was a sign of fatigue. He hadn't thrown in three weeks, but he did a great job, pounding the strike zone and using all of his pitches."
Martinez's defense made some big plays. Yankees first baseman Brian McCann led off the second with a drive to deep right-center. Leonys Martin went to the wall, jumped up and got his glove on the ball. Martin bobbled it momentarily but recovered to make the catch, robbing McCann of extra bases. In the fourth inning, Arencibia made a terrific leaping catch of Kelly Johnson's line drive.
"It was a heartbreaker," Martinez said. "Everyone played good. Everyone played extremely well. We showed a lot of guts out there; we just didn't come out on top today."
Martinez didn't get the win because the Rangers couldn't get him any runs against Yankees rookie starter Chase Whitley. The Rangers' leadoff hitter reached base in each of the first four innings and six of the first eight, but the lineup couldn't get a run across.
"We had some opportunities that could have kept it from going to the 14th inning," Washington said. "A lot of good stuff out there -- we played solid defense and pitched well. We didn't give it away; they just beat us."
T.R. Sullivan is a reporter for MLB.com. Read his blog, Postcards from Elysian Fields, and follow him on Twitter @Sullivan_Ranger. This story was not subject to the approval of Major League Baseball or its clubs.