OAKLAND, Calif. (AP) -- Joe Maddon walked up to Jason Hammel before the game and gave his little-used reliever a pep talk, telling him it was only a matter of time until he contributed after not taking the mound for 11 straight days.
That time came just a few hours later when Hammel pitched three scoreless frames in extra innings to help the Tampa Bay Rays beat the Oakland Athletics 7-6 Monday night behind Evan Longoria's two-run homer in the 13th.
"I said, 'Listen I know it stinks but we need you to stay ready because we're going to need you at some point and you're going to come through for us tonight,'" Maddon said. "I did not have that in the back of my mind when I said it to him. He pitched great. He really did."
Hammel (3-2) said he told his manager he was "pretty near insanity" because of the long layoff, but he handled it just fine once he took the mound to start the bottom of the 10th. He allowed one baserunner in the 10th, pitched out of a first-and-second jam with one out in the 11th and ended his night with a perfect 12th.
The strong outing came at a most tense time, when Hammel knew one bad pitch could cost his team the game.
"I honestly wasn't thinking about that. I was too excited to be in there," he said. "I almost forgot what to do. No matter what the score is I'm just supposed to get guys out. I made some good pitches when I needed."
Eric Hinske also hit a two-run homer for the Rays, who have won nine of 12 and bounced back after two last at-bat losses in St. Louis the previous two days.
This time they were on the positive end of a late-inning win. Carlos Pena led off the top of the 13th win a single off Chad Gaudin (3-3) and Longoria followed with a no-doubt drive that cleared the fence so easily that left fielder Emil Brown never even moved from his position.
It was the fifth homer of the season for Longoria, who is 8-for-18 his last four games following a 3-for-22 slump. Longoria also hit an RBI double in the sixth inning.
"I couldn't help but think about the way the last two ended," Longoria said. "It's always nice to get an extra-inning win."
The A's have lost eight of 10, blowing an early 3-0 lead in their first game home after a 2-7 road trip that first baseman Mike Sweeney called "embarrassing." Oakland rallied to tie this game in the eighth and nearly did it again in the 13th before falling short.
Daric Barton hit a two-out RBI triple that the A's thought for a moment might have been a game-tying homer before it bounced off the wall.
"We were jumping up and down and wishing it could go out," manager Bob Geren said.
The Rays had lost 30 of the first 36 games they had played in Oakland before Maddon took over as manager before the 2006 season. Tampa Bay has won two of its past three series here and is off to a good start on its first trip to the Coliseum this season.
The A's, who led 3-0 early, came back from one-run deficits to tie the game in the sixth and eighth innings. Thomas' second homer knotted the game at 4 in the sixth and Ryan Sweeney hit an RBI single off James Shields in the eighth to make it 5-all. Shields gave up five runs and eight hits in 7 2/3 innings, allowing the two homers to Thomas and a solo shot to Brown in the second.
Thomas' first homer came in the first inning and ended the second longest homerless drought of his career. Thomas' two-run shot was his first since connecting against the A's on April 8 in Toronto, when he was still a member of the Blue Jays. Thomas was released by Toronto less than two weeks later and returned to Oakland.
The stretch of 102 at-bats without a home run was the second longest of his career, following only a 114 at-bat stretch that began late in the 1992 season and ended April 25, 1993. This is about the same time of year Thomas started heating up back in 2006, when he hit 39 homers to help Oakland win the AL West.
"It's good to see," starter Joe Blanton said. "He was talking about it in Atlanta. I heard him say he saw some old video and saw something. That's all it takes is that first one. Hopefully he stays locked in now.
Thomas has 33 career multihomer games. ... Blanton allowed four runs and six hits in six innings and remained winless in seven starts in Oakland this season. ... Shields gave up three homers after allowing just two in his first nine starts. ... Oakland closer Huston Street struck out a career-high five batters while pitching two perfect innings.