ST. PETERSBURG, Fla. — For the first time in a century the New York Yankees won a game with just one hit.

Starlin Castro's two-run homer off Jake Odorizzi in the seventh inning was enough to give the Yankees a 2-1 victory over the Tampa Bay Rays on Sunday.

"We really weren't doing much," Yankees manager Joe Girardi said. "We get a huge hit from Starlin."

According to Baseball Reference data going back to 1913, the Yankees' only other one-hit win was when Charlie Mullen had an RBI single to beat Cleveland in six innings of a doubleheader nightcap on July 10, 1914.

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 centre-field fence.

"It felt really good, especially because we won the game," Castro said. "Gardy had a nice walk, and I was just looking for pitches I could drive."

Nathan Eovaldi (6-2) gave up one run and six hits in six innings to win his career-best fifth consecutive start.

"I had all the confidence in the world with our guys," Eovaldi said. "It's just one swing, and that's what happened."

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.

Odorizzi (2-3) struck out six and walked one in seven innings. He has given up seven homers in six starts this month after allowing two in five April outings.

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

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.

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

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.

TRAINER'S ROOM

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 . RF Carlos Beltran (right shoulder tightness) didn't play. . RHP Luis Severino (right triceps strain) made the first of at least two minor league rehab starts Sunday night with Class A Tampa, allowing two hits in three scoreless innings at Brevard County with two strikeouts and no walks.

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.

PINEDA'S PLAN

Girardi reiterated that struggling RHP Michael Pineda (2-6, 6.92 ERA) will remain in the rotation and make his next start Thursday against Detroit. The right-hander lost for sixth time in seven decisions, after allowing six runs over 3 2/3 innings Saturday. "We've seen Michael be really good," Girardi said. "It's in there. We just have to get it out."

UP NEXT

Yankees: RHP Ivan Nova (3-2) makes his second straight start against Toronto on Monday night. He allowed four earned runs over 6 2/3 innings and took the loss in the Blue Jays' 8-4 win Wednesday.

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.