Jose Lobaton clubbed a game-winning homer in the ninth to lift Tampa Bay to a 5-4 win over Boston in game three of their opening round Major League Baseball playoff series.

Lobaton's pinch-hit shot allowed the Rays to stave off elimination as they rallied from a three-run deficit against the Red Sox for the victory in front of a crowd of 33,675 at Tropicana Field ballpark.

Lobaton literally made a big splash Monday, crushing a pitch off Boston reliever Koji Uehara for a solo homer that sailed over the outfield wall and into a giant fish tank next to the bleachers.

"I was thinking victory. It was either going to be a double or a homer. It is unbelievable, something you can't explain," said Lobaton, who hit the first playoff walk-off homer in Tampa Bay history.

"Today was one of those days. We never gave up and we just kept fighting."

In the other AL playoff contest Monday, the Oakland A's clubbed three home runs and defeated the Detroit Tigers 6-3 to put last year's World Series runners-up on brink of being eliminated.

Evan Longoria sparked the comeback with a game-tying three-run homer off Red Sox pitcher Clay Buchholz in the fifth inning for the Rays who have faced elimination four times in the past eight days but managed to stay alive each time.

James Loney went three-for-three in the win, with David DeJesus and Yunel Escobar each collecting two hits and a run scored for the Rays, who trail in the series two games to one.

Jacoby Ellsbury finished three-for-five and scored twice for Boston, which had outscored its AL East rival by a 19-6 margin in the previous two contests. Slugger David Ortiz had an RBI single in the loss.

Buchholz allowed three runs on seven hits and striking out five in six innings of work.

It was the first homer allowed by Japan's Uehara since June 30.

Game four will take place Tuesday at Tropicana Field, with Jeremy Hellickson getting the start for Tampa Bay opposite Red Sox ace Jake Peavy.

Tampa beat the Red Sox in seven games back in 2008 to reach the World Series in the only other postseason series between the clubs.

The winner of this series will face either the Tigers or A's.

Seth Smith smacked a two-run homer and Brandon Moss added a solo blast in a go-ahead, three-run fifth inning as the A's used the long ball to seize a 2-1 lead over Detroit.

Josh Reddick cracked a solo shot for Oakland, who can advance to AL half of the MLB semi-finals with a victory in game four on Tuesday.

"I got a fastball right there and I was able to put the barrel to it," said Smith.

Oakland punched out 10 hits in game three after scoring just three runs and 11 hits in the first two contests of the series. The A's were third in the league during the regular season with 186 home runs.

The suddenly silent Detroit bats have scored in just two innings so far in this series.

Oakland, who snapped a four-game playoff losing streak, are expected to hand the ball to pitching ace Dan Straily for game four while Detroit looks to Doug Fister.