ST. PETERSBURG, Fla. (AP) Jake Odorizzi was bummed out for good reason, even after allowing just one hit over seven innings.
The hit was a home run that cost him the game.
Starlin Castro's two-run drive off Odorizzi in the seventh inning was the Yankees' only hit of the game, and it was enough to give New York a 2-1 victory over the Tampa Bay Rays on Sunday.
''One swing changes the whole outcome, and that's solely upon me,'' Odorizzi said. ''I didn't even watch it. I knew it went off the bat pretty hot, so I didn't even look. I knew we were losing.''
Brett Gardner took a 3-2 pitch with one out in the seventh to draw the Yankees' first walk and become their second baserunner. Castro then sent a 91 mph pitch over the center-field fence.
''It felt really good, especially because we won the game,'' Castro said.
Odorizzi (2-3) struck out six and walked one. He has given up seven homers in six starts this month after allowing two in five April outings.
''He quieted the lineup really the entire game and got beat by one hit,'' Rays manager Kevin Cash said. ''That's a difficult pill to swallow.''
Odorizzi was perfect until Dustin Ackley reached on a one-out error by shortstop Brad Miller in the sixth inning. Miller was positioned behind second base and moved to his right to field Ackley's grounder. He double clutched at the ball in his glove and bounced his throw to first. The play was called an error by official scorer Bill Mathews.
Tampa Bay challenged the call by first base umpire Gabe Morales, which was upheld in a video review.
Nathan Eovaldi (6-2) gave up one run and six hits in six innings to win his career-best fifth consecutive start.
Dellin Betances, Andrew Miller and Aroldis Chapman each pitched a perfect inning and combined for seven strikeouts. Chapman got his seventh save in seven chances, and New York is 6-0 this year when the trio has pitched in the same game.
''Really fortunate,'' Yankees manager Joe Girardi said of beating Odorizzi. ''His fastball command was really good and his spilt was really good.''
Evan Longoria, coming off a four-RBI performance in Saturday's 9-5 win, singled in Brandon Guyer from second base with two outs in the third. Since making his major league debut in 2008, Longoria's 90 RBIs against the Yankees are the most by any opponent.
Longoria nearly made it 4-0 in the fifth, but his two-out, opposite-field drive with two was caught at the right-field wall by Aaron Hicks.
Tampa Bay loaded the bases with two outs in the sixth but failed to score when Curt Casali popped out to first.
''Their guy was good, but we've got to find a way to get some more runs there,'' Cash said. ''We had our opportunities. . It just didn't happen.''
Yankees designated hitter Alex Rodriguez was hitless in three at-bats, including two strikeouts. A-Rod is 1 for 16 in four games since returning from a strained right hamstring, his lone hit a two-run homer in Friday's 4-1 win.
Yankees: 1B Mark Teixeira (neck spasms) didn't start his fifth straight game but entered in the seventh as a defensive replacement. He replaced Ackley, who jammed his right shoulder diving into first base and is expected to go on the DL.
Rays: RHP Brad Boxberger, out since the start of the season after adductor surgery, will be reinstated from the disabled list Monday. . RHP Ryan Webb (right pectoral strain) was placed on the DL
The Rays lost for the second time when allowing one hit. The other was a 3-2 loss to Oakland on May 24, 2014.
Rays: RHP Matt Andriese (3-0) makes his fifth start since being recalled from Triple-A Durham against Kansas City and RHP Ian Kennedy (4-3) Monday night.