BOSTON -- Tampa Bay Rays manager Joe Maddon spends most of his time giving signs.

On Thursday night, he went searching for one.

"You're always looking for signs, man. You're looking for signs from the baseball heaven and the baseball gods," he said after the Rays followed a fluke play with a three-run homer and beat the Boston Red Sox 9-2 to cut their deficit in the AL wild-card race to three games. "They've got to throw you signs once in a while. They've got to give you something to further the belief."

Evan Longoria hit a three-run homer and B.J. Upton and Casey Kotchman each hit two-run shots for Tampa Bay, which had trailed the Red Sox by nine games in the wild-card race on Sept. 3. But it was Upton's broken-bat RBI single that broke a scoreless tie and convinced the Rays that luck could be on their side.

With two on and two out in the third, Upton hit what would ordinarily be an inning-ending grounder toward shortstop Marco Scutaro. But the barrel of his bat arrived at the same time as the ball, and when Scutaro jumped to avoid the pointy shard he allowed the ball to go through his legs.

"Believe me, when I saw that I thought, 'Hey, let's see what's going to happen for the rest of the game,'" Maddon said. "And then the home run followed it right up."

The Red Sox dropped to 3-11 in September to fall from first place in the division to 4½ games behind the New York Yankees and into a race with the once-dismissed Rays for the wild-card. Boston and Tampa Bay play three more times at Fenway Park this weekend.

"I think enough things haven't gone our way, so I'll take it," Upton said. "We got one, and then Longo came behind me and we got a couple more."

Jeremy Hellickson (13-10) allowed one run on three hits and four walks, striking out four in 5 2/3 innings. Kyle Weiland (0-2) pitched three-plus innings, giving up four runs on three hits and two walks.

Weiland retired the first seven batters he faced before John Jaso doubled and, one out later, Desmond Jennings walked. Weiland could have been out of the inning if Upton's bat hadn't splintered.

"I kind of knew he broke his bat. But on the other hand I was just watching the ball and I figured probably the bat's going to stop somewhere in front of me," Scutaro said. "The bat just keep following the ball. At the last moment I just jumped. Nothing I can do."

Longoria followed with his 27th homer of the season, into the Red Sox bullpen to give Tampa Bay a 4-0 lead. It was 6-1 when Upton hit the first pitch he saw from Matt Albers, the fifth of seven Boston pitchers, over the Green Monster.

Although the paid attendance of 38,071 was officially the team's 705th consecutive sellout, much of the game was played under a steady drizzle and it finished with only a few thousand fans in their seats.

Game notes

The Boston fans gave a cheer when former Red Sox star Johnny Damon was hit by a pitch in the sixth. ... Boston ace Josh Beckett (12-5), sidelined by a sprained right ankle, is scheduled to start Friday night against James Shields (15-6), who reached a career high in wins with a victory over Boston last weekend in Tampa Bay. ... Shields is 1-8 lifetime at Fenway Park. ... Shields leads the majors with 11 complete games -- the most in a season since Randy Johnson had 12 for Arizona in 1999. ... Rays manager Joe Maddon said RHP Kyle Farnsworth remained day to day with a right elbow injury. ... Former Patriots quarterback Drew Bledsoe was at the game. ... Jose Iglesias got his first major league hit when he singled while pinch-hitting in the bottom of the ninth.