MIAMI (AP) -- Alex Rodriguez pinch-hit and flied out to end the game in his homecoming Monday night, and the Miami Marlins beat the New York Yankees 2-1.

Masahiro Tanaka of the New York Yankees looks on during the fourth inning of the game at Marlins Park in Miami. (Rob Foldy, Getty Images)

Rodriguez drew a big ovation when he batted for Stephen Drew with a runner at first, but he lofted a fly to right field and remained five hits shy of 3,000. Rodriguez was back in his hometown but didn't start because there was no DH for the interleague game.

Tom Koehler (5-4) pitched seven innings for Miami and was helped by acrobatic defense. Derek Dietrich, recalled from the minors last week, hit his first home run of the season in the seventh to put Miami ahead against Masahiro Tanaka.

Mark Teixeira hit his 18th homer for the Yankees in the second inning. Tanaka (4-2) allowed nine hits and two runs in seven innings.

(Copyright 2015 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.)