OAKLAND, Calif. (AP) Even after hitting three home runs off Sonny Gray - a first against Oakland's All-Star pitcher - Tampa Bay still needed another big swing late.
Asdrubal Cabrera, who had one of the homers off Gray, hit a two-run double off Drew Pomeranz in the ninth to lift the Rays to a 5-4 win over the Athletics on Saturday night.
It gave Tampa Bay its first ninth-inning comeback this season.
''We needed that one,'' Rays manager Kevin Cash said. ''We play in a lot of tight ballgames. We always talk about that's the way our club's built. We pitch well and we defend really well. These guys, at this point, are used to it.''
Before their late rally against the A's, the Rays were 0-49 when trailing after eight innings.
''I guess we hit the reset button and hopefully start a new trend,'' said leadoff hitter John Jaso, who also homered off Gray. ''That is important, coming back, especially when our pitchers do so well up on the mound.''
The Rays managed just five hits off Gray before rallying in the ninth.
Daniel Nava, a replacement after James Loney was ejected, drew a one-out walk against switch-pitcher Pat Venditte (0-2). Logan Forsythe followed with a double that moved pinch-runner Tim Beckham to third.
Cabrera, who hit a solo home run in the seventh, then lined the first pitch from Pomeranz down the right field line to drive in Nava and Forsythe.
Forsythe also hit his 14th home run this season for the Rays, who have won the first two games of this series by two runs total.
Alex Colome (6-4) recorded six outs for the win.
Tampa Bay's late comeback spoiled a mostly solid outing by Gray, who was up and down in his second game since skipping a start due to back spasms.
Oakland's All-Star pitcher allowed five hits - including a career-high three home runs - walked two and struck out four.
''That's been a little bit of the theme for us this year is that we have played seven or eight good innings and we end up losing some games late,'' A's manager Bob Melvin said. ''These one-run games that we've lost typically come a little bit later in games. It's frustrating.''
The A's - the worst fielding team in the majors -made several sparkling defensive plays.
Shortstop Marcus Semien made a backhanded stop and leaping throw to retire Jaso leading off the game, and center fielder Billy Burns robbed Forsythe of potential extra bases with a diving catch in the seventh.
Mark Canha and Josh Phegley each homered during a six-pitch span in the sixth inning for the A's. Oakland dropped to an American League-worst 53-71.
Rays starter Erasmo Ramirez gave up eight hits and four runs in seven innings.
Loney was ejected for tossing his helmet in the sixth and had to be restrained from going after home plate umpire Paul Nauert. Loney appeared to bump the umpire and screamed at Nauert as manager Kevin Cash rushed out from the dugout before base coaches Rocco Baldelli and Charlie Montoyo stepped in and pulled Loney away.
''Loney was frustrated with taking the pitch,'' Cash said. ''The umpire felt he was frustrated with him on the call.''
Rays: RHP Jose Dominguez cleared waivers and has been outrighted to Triple-A Durham. Dominguez was designated for assignment on Aug. 16 to make room on the roster for Drew Smyly.
Athletics: LHP Sean Doolittle was activated from the disabled list after missing 74 games with a strained left shoulder. . RHP Dan Otero was optioned to Triple-A Nashville. . 1B Ike Davis, who underwent surgery to repair a torn hip labrum on Friday, was transferred to the 60-day disabled list.
Rays: RHP Jake Odorizzi (6-6) has been up and down this season but has fared very well against the AL West. He's allowed only three earned runs in 29 2/3 innings for a 0.91 ERA.
Athletics: RHP Kendall Graveman (6-9) is winless in his previous seven starts and has a 6.89 ERA during that stretch.