ST. PETERSBURG -- One swing of the bat and all of the Rays' recent despair flew out the window.
That's the way Thursday's late-afternoon affair between the Rays and the A's went down, with Sean Rodriguez's fifth home run of the season giving the Rays a 5-2 win in 11 innings at Tropicana Field. The three-run blast snapped a four-game losing streak and triggered a mob scene at home plate.
"Fun to watch," said Evan Longoria, who started the Rays' winning rally with a leadoff single off Dan Otero. "Hopefully going forward, we can take some of the pressure off the pitching."
The Rays slugger referenced the team's struggling offense that entered the 11th inning having scored in just three of its previous 47 innings. Having that albatross hanging around their neck, they faced the tough Otero trailing 2-1.
Two outs after Longoria reached base, James Loney kept the inning alive with a single to left. Desmond Jennings followed with a single through the middle, driving home Longoria to tie the game at 2 and chase Otero in favor of Luke Gregerson.
Jennings moved to second on defensive indifference to set the stage for Rodriguez's heroics with runners on second and third. The count reached 2-2 when Rodriguez connected with an 81-mph slider and sent the ball down the left-field line.
"When I hit it, I knew it was far enough -- I didn't know if it was gonna be fair, though," Rodriguez said.
When the ball landed in the left-field seats, the Rays had their first walk-off win of 2014.
"We have not had that moment," Rays manager Joe Maddon said. "We've had plenty of opportunities for that moment. We talked about that before the game, and I believe there's more of those forthcoming. It was great for our guys to do that. We needed some kind of a boost all night."
Thursday's game felt like two halves, and the first half probably gave the Rays their biggest lift in weeks, because "The Cobber" is back.
Alex Cobb started for the Rays, a fact made evident by the scoreboard that showed six zeros when he exited the game after 6 2/3 innings without allowing a run.
Cobb breezed through the A's lineup using just 96 pitches in his return from the disabled list, where he had spent the past month while healing and rehabbing a left oblique strain. He had not pitched since throwing seven scoreless frames en route to his first win of the season against the Reds on April 12.
Cobb's only hiccup came in the sixth when the A's loaded the bases with two outs. But he retired Brandon Moss on a groundout to first to end the threat. After setting down the first two hitters in the seventh, Cobb handed the ball to Maddon, who called to the bullpen.
"[Cobb] was outstanding," Maddon said. "Having been off as long as he had, you saw the stuff, the strike-throwing, the competitive nature. ... He did his job. He was great and it was time to turn it over."
Jake McGee struck out Josh Reddick to close out the seventh.
"You always have that expectation going into the game that you need to get deep in the game and dominate and really try to execute your pitches and give your team the best chance to win," Cobb said.
Cobb tied a club record with his third consecutive start without allowing a run.
"All things considered, I was really happy with how all three pitches were working, and I was pleased to have the results we did," Cobb said.
Sonny Gray started for Oakland and held the Rays scoreless for six innings. He, too, faced a watershed bases-loaded moment with two outs in the third. Wil Myers unloaded a blast to right field that appeared to be extra bases, but Reddick ran into the wall to take away the hit and keep the game scoreless.
"Unbelievable," said Gray of Reddick's catch. "It was unbelievable. When he hit it, I thought it was a homer. Then I looked up and saw Reddick running after it. When you see him running that hard, you know something cool is about to happen. At that point, it was a game-saver. It was awesome."
Yunel Escobar came through for the Rays in the seventh with a single through the middle to drive home Jennings for a 1-0 lead. David DeJesus had a chance to pad the lead when he batted with two out and runners at second and third, but he lined out to second to end the threat.
Gray allowed one earned run on five hits and two walks while striking out three in eight innings to take a no-decision.
With the Rays holding a 1-0 lead, Rays closer Grant Balfour had a chance to nail down the win in the ninth. He wasn't able to get the job done, though, allowing a one-out RBI double to Yoenis Cespedes that put runners at second and third with one out.
To Balfour's credit, after intentionally walking Jed Lowrie, he retired Reddick and Alberto Callaspo on flyouts to end the inning.
Cespedes put the A's ahead in the top of the 11th with a sacrifice fly off Josh Lueke, whose fortunes changed in the bottom of the inning when the Rays' offense turned him into the winning pitcher rather than the loser.
"We don't necessarily start to dig a hole and say, 'All right, let's just bury ourselves,'" Rodriguez said. "We know something's eventually going to click, and hopefully sooner than later, so we're not clawing and scratching real late in September like we've done in the past. Definitely a good win."
Bill Chastain is a reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.