Mike Fontenot's sacrfice fly scored Shelley Duncan in the bottom of the eighth to draw the Rays to within two runs, but that's where the margin remained.
Ivan Nova started for the Yankees and got immediate defensive help from Melky Mesa. Rays leadoff hitter Desmond Jennings drove the first pitch he saw to the wall in center, where the Yankees' center fielder made a nice running, back-handed catch for the first out.
Nova, who is projected to be the Yankees' No. 5 stater, deftly dodged a jam in the fourth. Kelly Johnson singled to right to lead off the inning and moved to second when the ball eluded Yankees right-fielder Zoilo Almonte. Johnson moved to third when Leslie Anderson squibbed a single through the left side.
Ryan Roberts then lined out to third and Francisco Cervelli threw out Anderson trying to steal second base for the second out. Nova finished his escape by striking out Sean Rodriguez for the third out.
Nova allowed no runs on four hits while striking out two in four innings worked.
Alex Cobb, who is earmarked to be the Rays' No. 4 starter, made his fourth outing of the spring and continued to impress.
Entering Tuesday's game, Cobb had not allowed a run in his previous two outings, holding Baltimore and Pittsburgh to no runs on two hits while striking out 10. Tuesday, the 25-year-old right-hander held the Yankees to no runs on two hits, striking out six in five innings.
"Today, I don't know where it came from [my] bullpen [session] was horrendous," said Cobb. "I really felt bad going in. My legs weren't underneath me. I've really been waiting for that game, because it's going to happen throughout the season when you don't feel good. And I made sure I focused on a couple key things in my mechanics and I did it aggressively. I was happy to see that the results were good."
Up next: Jeff Niemann will start for the Rays when they travel to Sarasota on Thursday afternoon for a 1:05 p.m. ET contest against the Orioles. Niemann is battling Roberto Hernandez for the No. 5 spot in the rotation. Cesar Ramos, Josh Lueke, and Juan Sandoval are also expected to pitch.
Bill Chastain is a reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.