Updated

Marcus Thames hit a long homer then had the go-ahead RBI single in the ninth inning as the New York Yankees rallied from five runs down to beat the Texas Rangers 7-6 on Wednesday night for a split in the two-game series between the division leaders.

Thames' grounder 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).

Mariano Rivera worked the ninth for his 24th save in 26 chances, a night after giving up a 10th-inning single and losing for the first time in 32 career appearances at Rangers Ballpark over 16 seasons.

Elvis Andrus led off the Texas ninth with a triple off Rivera, before the Yankees closer retired the Nos. 2-4 hitters, including the majors' leading hitter, Josh Hamilton, on a comebacker.

Thames led off the eighth by pulling a 410-foot shot down the left-field line, his fourth homer of the season getting New York within 6-5.

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.

Kerry Wood (2-4) threw two scoreless innings for his first decision in his five appearances since New York acquired him from Cleveland on July 31.

The Yankees (70-43) have the best record in the majors, stretching their AL East lead to 1½ games over Tampa Bay.

Texas (65-48) still has a 7½-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 Michael 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 — the Yankees' 2-3-4 hitters — 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 to get the Yankees within 6-4 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.

Yankees starter Javier Vazquez gave up six runs and eight hits over 4 1-3 innings.

Moreland, the Rangers' rookie first baseman in only his ninth game, snapped a 1-all tie with his two-out, two-run single in the fourth.

An inning later, Murphy chased Vazquez with a two-run single that made it 6-1. Hamilton, who had three hits, also had an RBI double earlier in the fifth.

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 inning 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.