ARLINGTON, Texas (AP) -- Once Marcus Thames finally put the New York Yankees ahead, there was no way Mariano Rivera was going to have a repeat performance.
One loss in Texas was enough for the longtime Yankees closer.
Thames hit a long homer in the eighth inning, then had the go-ahead RBI single in the ninth as New York rallied from five runs down to beat the Rangers 7-6 on Wednesday night for a split in the two-game series between the division leaders.
A night after losing in Texas for the only time in his first 32 career appearances over 16 seasons, Rivera gave up a leadoff triple to Elvis Andrus in the ninth before retiring the Nos. 2-4 hitters, including Josh Hamilton on a comebacker after the majors' leading hitter already had three hits.
" That's Mo, right through the heart of their order, three tremendous hitters,'' manager Joe Girardi said. " I was thinking we're in trouble here, but if anyone can do it, Mo can."
After Andrus' liner into the right-center gap, Michael Young had a short flyball to right where Austin Kearns made a shoestring grab. Hamilton and Vladimir Guerrero hit grounders to give Rivera his 24th save in 26 chances.
Asked what was going through his mind after the leadoff triple, Rivera responded, " Nothing. I'm trying to get the next guy out and go from there."
What about after Kearns' catch?
" I'm thinking, `Oh, my God. We have to win now,''' he said. " I've got Hamilton next, who I've seen before, so I made my pitches."
The Yankees (70-43), who have the best record in the majors and a 1 1/2-game lead over Tampa Bay in the AL East, matched their biggest comeback of the season despite tying a franchise record with 17 strikeouts. Their other 17-K games were in 1901 and 1999.
Thames drove in the go-ahead run on a rolling single between shortstop and third base came after Derek Jeter had tied the game with a chopper past a drawn-in infield, an RBI single off Rangers rookie All-Star closer Neftali Feliz (3-3).
" The whole game, we were where we wanted to be. We just couldn't stop them from the sixth inning on,'' Rangers manager Ron Washington said. " We got their closer last night. They got ours tonight."
Feliz, in his first save chance since July 31 after converting 20 in a row, walked the leadoff batter in the ninth, gave up a single to No. 9 hitter Brett Gardner and threw a wild pitch before Jeter's tying hit. Nick Swisher struck out of the fourth time before Alexi Ogando came on and gave up the single to Thames.
Thames led off the eighth by pulling a 410-foot shot down the left-field line off Frank Francisco to get New York with 6-5.
Kerry Wood (2-4) threw two scoreless innings for his first decision in five appearances since New York acquired him from Cleveland on July 31.
Texas (65-48) still has a 7 1/2-game lead over the Los Angeles Angels in the AL West, by far the largest lead in any of baseball's six divisions.
Rangers starter Cliff Lee struck out 11 with no walks in 6 1-3 innings, matching his shortest outing of the season and ending his streak of 10 consecutive starts going at least eight innings. He gave up four runs.
But Young homered while David Murphy and Mitch Moreland had two-run singles for Texas, which had scored only 2.28 runs a game for Lee in his first six starts since being traded to the Rangers instead of New York on July 9.
Lee already had seven strikeouts by the end of the fifth, five on called third strikes. He struck out Swisher, Thames and Alex Rodriguez in order in the sixth after Jeter had a leadoff triple and scored on a wild pitch to make it 6-2.
But after Lance Berkman had an RBI double and Gardner an RBI single in the seventh for a 6-4 score with two runners still on base, Lee was done. Submarine-throwing Darren O'Day struck out Jeter before Darren Oliver struck out Swisher to end the threat.
" I started missing my spots a little bit,'' said Lee, who still threw 76 of 106 pitches for strikes. " I felt like I was running out of gas."
Yankees starter Javier Vazquez gave up six runs and eight hits over 4 1-3 innings and was chased by Murphy's two-run single that made it 6-1.
Murphy has hit .423 (11 for 26) with 11 RBIs in a seven-game hitting streak. He had a two-run homer Tuesday before his game-winning single with the bases loaded in the 10th off Rivera.
Notes: Lee has 137 strikeouts and only nine walks in 161 1-3 innings this season. ... Yankees 1B Mark Teixeira is expected to rejoin the team Thursday in Kansas City after missing the two games in Texas for the birth of his third child. ... In the crowd of 48,676 was former President George W. Bush and his wife Laura, who sat in the first row by the Rangers dugout. The fourth sellout of the season was the largest crowd since opening day.