Niemann (6-4) gave up two runs on four hits through eight innings and was sent out in the ninth to try to finish the job. He gave up a leadoff homer to Hideki Matsui, however, and then was roughed up with a double by David DeJesus and a two-out triple by Cliff Pennington.
After throwing 117 pitches Niemann was replaced by Kyle Farnsworth, who retired Kurt Suzuki for the game's final out.
Evan Longoria and Casey Kotchman both doubled in a run in the fifth and Matt Joyce singled in another to give the Rays a 4-0 lead.
Tampa Bay scored three more times in the sixth with Ben Zobrist producing a two-run single.
The Rays won their third straight and handed the Athletics their fourth consecutive loss.
Guillermo Moscoso (4-6) suffered the setback, allowing four runs on six hits in 4 2/3 innings.
Swim Week Miami Beach 2014 [PHOTOS]