ST. PETERSBURG, Fla. -- Brett Anderson needed a great defensive play from Ryan Sweeney to preserve his special night.
Anderson pitched into the seventh inning to pick up his first major league win, and Orlando Cabrera was one of six Oakland Athletics to drive in at least a run in a 7-6 victory over the Tampa Bay Rays on Wednesday night.
"Getting the first win is an unbelievable feeling," Anderson said. "I want to carry it over down the stretch."
Anderson (1-4) gave up four runs -- two earned -- and four hits over six-plus innings. The victory came in his seventh career start, all this season.
Brad Ziegler pitched the ninth for his fifth save. He some got help when Sweeney made a diving, two-out catch on B.J. Upton's drive to center that might have scored the tying run.
"I knew it was going to be close, real close," Upton said. "Another inch, it's a triple. He came up with it. A great play by him."
Sweeney completed his dash toward left-center with a full-out dive.
"I knew it would be close, but as an outfielder, you say you know you were going to catch it right off the bat," Sweeney said.
Cabrera had two RBI, helping Oakland win its second in a row and sixth in the last 16 games.
Tampa Bay left-hander Scott Kazmir (4-4) had another dismal outing, allowing seven runs, eight hits, four walks and hitting a batter in 4 1/3 innings. Over his last five starts, Kazmir has given up 31 runs -- 29 earned -- over 23 innings.
"It's one of those things that you just really sit back and evaluate it [Thursday], get a chance to talk to him, see where he's at and try to come up with the right game plan for the next time out," Rays manager Joe Maddon said.
Kazmir said he picked up some bad habits coming back last year after missing the opening month of the regular season with a left elbow strain.
"It's really frustrating," Kazmir said. "Words can't explain it. You're completely healthy, feel good and you're just kind of fighting yourself."
Carlos Pena and Willy Aybar homered for the defending AL champion Rays (20-22), who have lost two in a row after a four-game winning streak.
Oakland took a 2-0 lead on RBI singles by Jason Giambi in the first and Kurt Suzuki during the second. Adam Kennedy's run-scoring double and a sacrifice fly by Bobby Crosby made it 4-0 in the third.
Pena hit a two-run homer in the fourth to make it 4-2. Pena's 14th homer of the season ended a 40 at-bat stretch in which he hadn't gone deep.
Aaron Cunningham had an RBI double and Cabrera drove in a pair with a single as Oakland extended its lead to 7-2 in the fifth.
Aybar hit a solo homer in the fifth and added a sacrifice fly during a two-run seventh that pulled Tampa Bay to 7-5. Akinori Iwamura tripled in a run in the seventh, and was later thrown out by second baseman Kennedy attempting to score on pinch-hitter Ben Zobrist's pop fly down the right-field line.
After Santiago Casilla threw a wild pitch that allowed a run to score that cut the Athletics' advantage to 7-6, the right-hander later induced a grounder from Aybar with two outs and the bases loaded in the eighth.
New Yankee Stadium and Tropicana Field are the only two major league parks where at least one homer has been hit in every game this season. ... Oakland RHP Justin Duchscherer (right elbow surgery) has had "no setbacks" in his rehab program according to manager Bob Geren and could start throwing off a mound shortly. ... Rays RHP Chad Bradford (right elbow surgery) is nearing the start of a minor league rehab assignment. ... Athletics backup C Landon Powell, who hurt a hamstring running out a grounder on Monday, is available off the bench but won't be in the lineup for a few more days. ... Oakland RHP Russ Springer, who faced one batter, experienced tightness in his forearm, but said he is fine.