ST. PETERSBURG -- The Rays made CC Sabathia bend, but it was the Yankees bullpen that finally broke.
Tampa Bay used a stolen base and a tiebreaking RBI single by Chris Gimenez in the bottom of the eighth to take Monday's series opener against New York, 4-3, before 28,585 at Tropicana Field.
With the win, the third-place Rays closed to within 2 1/2 games of the American League East-leading Yankees.
"It's one game at a time," Rays manager Joe Maddon said. "I just loved the way we played today. I thought we were so up for that game from the first pitch. ... I was really proud of our guys."
The Yankees continue to struggle at Tropicana Field, having lost 10 of their last 11 games there, dating to July 2011. The Rays' resilience at home when facing the Yankees has helped them go 8-5 overall against New York this year.
"When we're playing better teams, I think we're playing better baseball," Maddon said. "Everybody talks about the difficulty of the remaining part of the season; I kind of like it. I think it's going to bring out the best in us."
Gimenez came up big for the Rays, recording a pair of RBI singles on the day.
"I told myself before I got in the box, 'This is definitely the biggest at-bat of your life,'" Gimenez said of the go-ahead hit. "So I might as well do something fun."
The late run allowed starter James Shields to pick up his 13th win of the year after allowing three runs on five hits and three walks in eight innings. Shields struck out five, throwing 121 pitches. Fernando Rodney came on in the ninth and picked up his 41st save.
"Setting the tone for the series was huge," Shields said. "We had the crowd tonight; how many people showed up was awesome. It kind of got me going when I was out there."
Sabathia, New York's starter, struck out four and allowed three runs on eight hits and two walks over seven innings, settling for a no-decision.
"It's frustrating, especially after the last outing, not being able to hold the lead," said Sabathia, who was coming off his first loss since June. "Today, I've just got to be a lot better than I was."
Jeff Keppinger and Ben Francisco hit back-to-back singles to lead off the second for the Rays, putting pressure on Sabathia. After Ryan Roberts struck out looking, Gimenez knocked his first RBI single of the day to give Tampa Bay an early lead.
"I felt good about the bottom of the batting order today, going into it versus Sabathia," Maddon said. "When the lineup sets up like that, we have a chance to score runs one through nine. That's kind of a nice feeling."
B.J. Upton doubled the Rays' lead the next inning when he blasted a 2-1 offering from Sabathia over the left-center-field wall for his 17th homer of the season.
"Two-seamer away," Sabathia said of the pitch. "It was up, and he put a good swing on it. ... I was trying to get a ground ball. He was in a hitter's count. I was just trying to make a pitch and ended up leaving the ball out over the plate."
New York answered in the top of the fourth when Eric Chavez hit a liner to left field with runners at the corners and no outs, allowing the speedy Robinson Cano to score from third. Raul Ibanez followed with an RBI triple that just got under the glove of Francisco in right field, easily bringing in Alex Rodriguez from first.
Russell Martin came to the plate next and hit a grounder off the foot of Shields that ricocheted to Keppinger, who left first base to get to the ball. During Keppinger's unsuccessful attempt to beat Martin to the first-base bag, Ibanez scored from third to give the Yankees a 3-2 advantage.
"There were some weird things that happened," Shields said of the fourth inning. "Getting out of the inning with three runs there was nice, and settling in there was good."
Tampa Bay put Sabathia under more pressure in the bottom of the fifth when Upton and Ben Zobrist executed a double-steal with no outs, advancing to third and second, respectively. Evan Longoria took advantage of the opportunity, hitting a sharp grounder to short that brought in Upton and tied the game at 3.
"One thing that I really love about B.J. is that he's not afraid -- he's not afraid of the moment," Maddon said. "That's a big part of his success and why he keeps getting better and better. He goes out and he plays, and he's not afraid of the moment."
The Rays threatened in the bottom of the eighth with Rich Thompson pinch-running for Keppinger, who led off with a single. Thompson attempted to steal second base but was called out by second-base umpire Bob Davidson. Maddon came out to argue the call and was eventually ejected for the third time this season.
It didn't matter, though, as Roberts singled and stole second before Gimenez singled him home with two outs against David Robertson to put the Rays ahead to stay.
"Him stealing that base kind of put in my head, 'Wow, a base hit and we've got a chance to win the game right now,'" Gimenez said. "I'd better get a good pitch and not swing at something stupid right now. ... Luckily, I got myself into a decent count where I could at least try to make something happen."
Greg Zeck is an associate reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.