ST. PETERSBURG, Fla. -- Cody Ross helped the Boston Red Sox rebound from a frustrating loss.

Ross homered and drove in four runs, Felix Doubront won his third consecutive start and the Red Sox beat the Tampa Bay Rays 5-3 on Thursday night.

"I was going after this game tonight," Boston manager Bobby Valentine said. "The guys really wanted this game, and I was just going to do everything we could to win it. Just frustration (from Wednesday's loss), and we wanted to get back into the winning ways."

The Red Sox were beaten 2-1 on Wednesday. The Rays' go-ahead run scored when Ross, in right field, had problems with the Tropicana Field roof and had to backpedal to catch Luke Scott's shallow sacrifice fly.

Ross extended Boston's lead to 5-2 Thursday on a two-run single off reliever Wade Davis with two outs in the eighth.

"Cody was big," Valentine said. "Cody will give you everything he has, and it's enough for me."

Doubront (4-1) allowed two runs and six hits over 5 2/3 innings. The left-hander was hit on the ear by a ball during batting practice Tuesday and cleared one day later to make his scheduled start.

Matt Moore (1-4) gave up three runs and five hits in six innings for Tampa Bay, which had its four-game winning streak snapped.

"I thought he finished really strong," Tampa Bay manager Joe Maddon said. "That's definitely a game to build off. He definitely pitched well enough to win. Confidence is a big thing. I know he's going to sleep better. Despite the loss, he's going to feel better about himself. That's just a right step in the right direction."

Moore retired his last 10 batters. He struck out eight and walked one.

Alfredo Aceves, the fifth Boston reliever, got four outs for his eighth save. He allowed B.J. Upton's RBI single with two outs in the eighth.

After falling behind in the count 0-2, Ross worked a bases-loaded walk off Moore to put the Red Sox up 1-0 in the first. Moore avoided further damage by striking out Daniel Nava to end the inning.

Boston went ahead 2-0 on Marlon Byrd's second-inning homer. Ross made it 3-0 with his seventh homer, on an 0-2 pitch with two outs in the third.