ARLINGTON, Texas -- Masahiro Tanaka showed Wednesday night why the Yankees are trying to acquire top-of-the-rotation help before Friday's 4 p.m. trade deadline.

The righthander, while not bad, again didn't pitch like an ace in a 5-2 loss to the Rangers in front of 31,658 at Globe Life Park.

Tanaka, who entered 7-3 with a 3.64 ERA, took the loss after he allowed four runs and nine hits in six innings. It was the sixth time in his last seven starts Tanaka allowed three earned runs or more.

The Yankees (57-43), still an MLB-best 16-6 in July and who still lead the AL East by six games over the Orioles, saw one pitcher they were interested in, the Phillies' Cole Hamels, come off the board during the game. According to multiple reports late last night, an agreement was reached sending the lefthander to the Rangers.

The Yankees are very much interested in the Tigers' David Price, whom Detroit GM Dave Dombrowski said yesterday afternoon was available, but it remains to be seen if they'll be able to outbid teams such as the Dodgers and Blue Jays, both of whom are desperate to land a front-line starter.

The Yankees, after scoring 21 runs in Tuesday night's 21-5 victory, managed eight hits Wednesday night. Rangers righthander Colby Lewis (11-4) held them to two runs and seven hits in six innings.

The Yankees did score first.

Carlos Beltran led off the second with a home run to right, his eighth, to make it 1-0. Lewis retired two straight but Didi Gregorius improved to 15-for-his-last 33 with an opposite-field single. Stephen Drew lined a single to center where Delino DeShields booted the ball -- the error allowed Gregorius to move to third. Jacoby Ellsbury came through with a two-out hit, bouncing one back through the middle to make it 2-0.

The Rangers tied it in the bottom half, a 31-pitch inning for Tanaka. Adrian Beltre singled and Mitch Moreland walked. Tanaka fell behind Josh Hamilton 2-and-0 before the leftfielder lined a 92-mph pitch to right that brought in Beltre to make it 2-1. After Elvis Andrus struck out, Shin-Soo Choo singled to left to bring in Moreland to tie it at 2.

Robinson Chirinos flew out, but DeShields delivered Hamilton with a single to right, making it 3-2.

Beltre singled and scored in the fifth, making it 4-2 and a Gregorius error, with rookie Caleb Cotham on the mound, led to Hamilton's RBI single that made it 5-2.