DETROIT - The Yankees return to the Bronx in a heck of a lot better shape than when they left 10 days ago.

And while not the hottest baseball club in New York, they seem more than ready to meet the Mets.

The Yankees completed their three-city, 10-game trip an impressive 7-3 by way of a 2-1 victory over the Tigers on Thursday afternoon at Comerica Park.

The Tigers entered the series with baseball's best record, but after the Yankees (9-7) took three of four, the Mets, who come to the Bronx Friday night, can boast of that accomplishment.

The Yankees managed just three hits Thursday, with a second straight standout performance from Masahiro Tanaka and more dominant work by Dellin Betances and Andrew Miller leading the way.

Tanaka, at first did not look comfortable in the 33-degree first-pitch temperature. But he allowed just one run and three hits over 6 1/3 innings. Tigers starter Anibal Sanchez allowed one run and one hit over 6 1/3 innings but committed a key balk that allowed the Yankees to tie the score at 1 in the sixth. Tigers manager Brad Ausmus came out to argue the call, a discussion that ended with the Detroit manager's ejection.

The Yankees pushed ahead in the eighth against lefthander Tom Gorzelanny. Jacoby Ellsbury doubled into the gap in left-center, and Brett Gardner sacrificed him to second with a bunt. An intentional walk to Carlos Beltran brought up Brian McCann, 0-for-16 in his career against Gorzelanny. McCann took a ball before shooting one off Miguel Cabrera's glove at first, the 3-4-3 put out bringing in Ellsbury to make it 2-1.

Betances (3-0), who came on with one out in the seventh, pitched a perfect eighth, striking out two with his fastball reaching 98 mph. Miller improved to 6-for-6 in saves with a perfect ninth.

Tanaka struggled through a 23-pitch first but the damage wasn't terrible.

Leadoff man Anthony Gose started the game by slicing a 1-and-2 splitter down the leftfield line for a double. Ian Kinsler's ground out moved Gose to third and, after Cabrera walked, Victor Martinez's sacrifice fly to medium left brought the Tigers centerfielder in for a 1-0 lead.

The Yankees got one runner in scoring position over five innings before putting another there in the sixth. Ellsbury led off with a walk and stole second, his fourth steal of the season. Gardner's ground out to first moved Ellsbury to third. Sanchez looked as if he might get out of the inning, striking out Beltran, but with McCann at the plate, the pitcher was called for a balk by third base umpire Gerry Davis.

The Yankees squandered a chance to take the lead in the seventh. Headley started the inning with a walk and, after Young struck out, went to second on a wild pitch. That pitch evened the count on Garrett Jones at 1-and-1 and the Tigers chose that point to put in Gorzelanny. The reliever struck out Jones, walked Drew and ended the inning by getting pinch-hitter Mark Teixeira, 3-for-7 in his career vs. Gorzelanny, to fly out to deep right on a 3-and-1 pitch.

J.D. Martinez doubled with one out, and after Yoenis Cespedes walked, Yankees manager Joe Girardi called on lefty Justin Wilson. The Tigers countered with pinch hitter James McCann, who smashed a grounder down the third base line where Headley made a diving stop to his right. Headley's rushed throw to second hit the dirt, but second baseman Gregorio Petit scooped it for the second out. Betances got Nick Castellanos to foul out to first to end the threat.