OAKLAND, Calif. (AP) -- James Shields is glad he didn't get traded away from Tampa Bay. He pitched like it, too.
The subject of trade rumors right up until Tuesday's non-waiver deadline, Shields showed why he was so coveted with his most dominant performance of the season.
The Rays right-hander pitched a three-hitter for his seventh career shutout, giving Tampa Bay's taxed bullpen a much-needed rest in an 8-0 win over the Oakland Athletics on Tuesday night.
''It was pretty much textbook. He was outstanding,'' Rays manager Joe Maddon said. ''I loved his approach. It was spectacular. That was as good as I've seen him in a long time.''
The game lasted just 2 hours, 37 minutes, a sharp turnaround from 24 hours earlier when the two teams played 15 innings in a marathon that went 5 hours, 9 minutes and ended after midnight.
Shields, a 16-game winner in 2011, was a big reason for that. He retired 14 straight at one point, faced just two batters over the minimum and needed only 98 pitches while winning for the first time in nearly a month.
''It's very satisfying, obviously (for) all the talk that's been going on but for me personally,'' Shields said. ''It really hadn't bothered me but it's good to be a Ray. This is my home. I'm glad to be here.''
Tampa Bay fielded several inquiries for the right-hander before the trade deadline before deciding to hold onto him.
It turned out to be a wise decision, at least for now.
Shields gave up a one-out single to Chris Carter in the second, a leadoff single to Jemile Weeks in the fourth and a two-out single to George Kottaras in the eighth. None of the runners advanced.
''When he's on, he's good and he was really good tonight,'' A's manager Bob Melvin said. ''When someone is pitching that well it's tough to analyze the offense.''
B.J. Upton drove in two runs and the Rays broke out of their prolonged offensive slump to improve to 5-3 on their nine-game road trip.
Sam Fuld had three hits, Upton added two and six different players drove in runs for the Rays. Tampa Bay went into the game last in the majors in hitting and had scored only nine runs in its previous four games before knocking A's starter Tommy Milone around for two runs in the second and three in the fifth.
That was all Shields (9-7) needed to secure his 17th career complete game and first this season.
As good as Shields was, Maddon was just as pleased with the offense.
Eight players had at least one hit and six scored at least one run. The eight runs are also the second most scored by Tampa Bay since the All-Star break.
''All kinds of moving the baseball when it needed to be moved,'' Maddon said. ''That's what with have to be better with situationally. That was as clean a game as we've played in a long time.''
Oakland, which set a franchise record for winning percentage in July, couldn't keep up and fell to 13-4 since the break.
The A's didn't get a runner to second and were shut out for the 12th time this season.
Milone (9-8) was tagged for five runs in six innings against Tampa Bay. Milone, who allowed only six earned runs over 59 2-3 innings in his previous eight starts at home, struck out four and walked one.
''I fell behind hitters and left the ball up,'' Milone said. ''Strike one is a big pitch for me. If I don't get that then I have to throw a good pitch and then I get into a deeper hole.''
The Rays scored twice in the second against Milone. Upton had an RBI single to drive in one while Desmond Jennings scored on a groundout.
Tampa Bay opened the sixth with three straight singles off Milone to go up 3-0. Carlos Pena added a sacrifice fly to drive in Ben Zobrist and Sean Rodriguez singled in Jeff Keppinger to make it 5-0.
The Rays added an unearned run in the seventh off Evan Scribner and scored twice in the ninth.
NOTES: The Rays called up RHP Josh Lueke before the game to give their bullpen a break following Monday's marathon loss. Lueke was with the Rays coming out of spring training and has an 18.90 ERA in three games with the big league club. To make room for Lueke, Tampa Bay optioned infielder Brooks Conrad to Durham. ... DH Evan Longoria was given the day off in his rehab but is scheduled to play in the minors for the Rays again Wednesday. ... RHP Jarrod Parker (7-4) pitches the series finale for Oakland while RHP Alex Cobb (4-8) goes for Tampa Bay.