OAKLAND, Calif. (AP) -- Tampa Bay ended Oakland reliever Brad Ziegler's record scoreless streak. Then the Rays ended the Athletics' hopes of winning their first series in more than a month.
Ziegler started his career by not allowing a run in 39 consecutive shutout innings -- including the eighth Thursday -- to tie a 59-year-old major league record for relievers. Upton hit an RBI double that scored Akinori Iwamura, who walked, to give the Rays a 5-4 lead in the ninth.
"I didn't think about the streak until I started walking back on the mound," Ziegler said. "The first thought that popped in my head was, 'I can't believe that just happened with a runner on first,' but I guess the good thing it wasn't a cheap one. A whole bunch of things fell at once and so that way there's no pressure from this point on."
Ziegler, Oakland's rookie reliever who began the season in the minors, has been one of the few highlights for Oakland in the second half, setting numerous records including the most shutout innings by any pitcher to start a career. The right-hander extended that mark to tie the major league single-season record for consecutive scoreless innings by a reliever set by Cleveland's Al Benton in 1949.
"It's almost been like a no-hitter type streak or something," A's manager Bob Geren said. "Unbelievable what he's done, but I'll get him right back out and try to start another one. He's been tremendous."
"There were many, many moments where momentum shifted and we were able to stay focused, stay poised and come out of some tough situations," Pena said. "Eventually we were able to put some runs on the board, but the key was being able to stay in the present and not letting that shift of momentum affect our approach at the plate and on the mound. It's a great win for us because it was quite difficult."
Jason Hammel (4-3) pitched 2 2/3 innings to earn the win for Tampa Bay, which lost closer Troy Percival to a sprained right knee in the ninth. Percival hurt himself while fielding a sacrifice by Mark Ellis and had to leave the game after limping back to the mound.
Hammel allowed an unearned run in the 12th before giving way to Trever Miller. Miller the eighth Tampa Bay pitcher, hit Daric Barton before getting pinch-hitter Rob Bowen to hit a grounder to third to earn his first save in two tries this season.
Cliff Floyd walked four times and scored four runs for the Rays, who won two of three from Oakland and haven't lost a series since the All-Star break.
"This type of win is what's been happening since early in the season when we started win a lot of games late," Floyd said. "We've got our confidence up and we believe as long as we go on that field we've got a chance to win."
Tampa Bay missed a chance to win in the 11th inning of the 4-hour, 24-minute game when Rocco Baldelli was tagged out at home plate by Oakland catcher Kurt Suzuki after Casilla's pitch skipped under Suzuki. The ball bounced off the backstop right back to Suzuki, who raced to the plate to get Baldelli.
Pena then hit the first pitch he saw from Casilla in the 12th over the wall in right field to put the Rays ahead for good.
"I can't ask for anything more," Rays manager Joe Maddon said. "It's exactly what we're looking for. Beyond everything else is the continuous maximum effort. It was tremendous. I loved it."
Oakland, which hasn't won a series since taking three of four from Seattle in early July, rallied to tie the game on Frank Thomas' RBI single in the bottom of the ninth but couldn't do much else against Tampa Bay's bullpen.
Carlos Gonzalez hit a two-run homer for the A's, who lost their ninth consecutive series for the first time since 1979. Oakland is 4-21 since the All-Star break, the worst mark in baseball.
Justin Ruggiano tied it at 4 in the fifth with a pinch-hit single to drive in Floyd.
Tampa Bay right-hander James Shields gave up all four Oakland runs and had a season-high five walks in five innings.
A's starter Sean Gallagher had another rough outing, lasting only four innings while giving up three earned runs and walking four.
Thomas's RBI was the 1,703rd of his career, moving him past Reggie Jackson into 20th place on the all-time list. ... Oakland's Jack Cust tied his own team record by striking out in his 19th consecutive game. Cust, who leads the American League in strikeouts, set the record earlier this year. ... Oakland had not scored more than four runs in its previous 15 games, the longest such streak in Oakland history.
Tatis homers but Marlins rally late to beat Padres 3-2
— Fernando Tatís Jr. hit his NL-leading 30th homer for an early lead but the Miami Marlins rallied late and defeated the San Diego Padres 3-2 Saturday night.
Matt Harvey impressive again, Orioles beat Nationals 5-3
— Matt Harvey allowed one hit in six scoreless innings in another outstanding performance and the Baltimore Orioles held on to beat the fading Washington Nationals 5-3 on Saturday night.
Mancini, Mountcastle mash homers as O's beat Nats
Trey Mancini and Ryan Mountcastle both take Jon Lester deep to help the Orioles take down the Nationals.
Tatis launches 30th homer of season vs. Marlins
Fernando Tatis Jr. crushes his 30th home run of the season to left-center field in the first inning vs. the Marlins.
Jesus Aguilar gives Marlins lead with 2-run single
Jesus Aguilar rips an RBI single up the middle to give the Marlins a 3-2 lead vs. the Padres.
Cleveland Indians manager Terry Francona sent home with head cold
Cleveland Indians manager Terry Francona wasn't in the dugout Saturday night for Cleveland's game against Tampa Bay because of a lingering head cold.