ST. PETERSBURG, Fla. -- Tampa Bay Rays manager Joe Maddon knows that even after a much-needed victory, his team still has an uphill battle to make the AL playoffs.
|More on Red Sox-Rays|
|More MLB coverage|
Despite the win, Tampa Bay fell 6 ½ games behind the AL East-leading New York Yankees, who swept a day-night doubleheader against Toronto. The Rays started play six games back in the AL wild-card race.
"We want to do a little of Minnesota Fats ... got to run the table," Maddon said. "We've got to believe we can do it. We have to get really hot. We have no alternative. The standings are very difficult, but we are alive and kicking."
"Walks are the killer bee," Red Sox manager Bobby Valentine said.
Keppinger hit a solo homer, and Pena added a two-shot off Daisuke Matsuzaka (1-6) as Tampa Bay went ahead 5-3 in the fourth.
Chris Archer (1-3) allowed three runs and five hits in five innings for the Rays, who won for the second time in nine games. It was the rookie's first major league win.
"It feels pretty good," Archer said. "This is a classic example of keep the team in the game for as long as you can and they'll pull it out for you. I think it was big all around tonight. It's hard not to be selfish, but as a team it's awesome that we got the win, and for it to be my first one, that's pretty amazing, too."
The Red Sox (68-82), assured of their first losing season since 1997, got two RBI from Jacoby Ellsbury.
Boston took a 3-1 lead in the third on Ellsbury's run-scoring single and an RBI grounder by Dustin Pedroia. Ellsbury has 10 RBI in his last 11 games.
Ben Zobrist, who drove in four runs in the Rays' 7-5 loss to Boston on Tuesday, cut the deficit to 3-2 with an RBI single later in the third.
Tampa Bay loaded the bases with no outs during the second on singles by Evan Longoria, Scott and Keppinger. The Rays scored just once to tie it at 1 when Matt Joyce followed with a walk. Matsuzaka avoided further damage by striking out Pena and getting a double-play grounder from Molina.
Joyce also had an eighth-inning RBI single.
Matsuzaka gave up five runs and nine hits in three-plus innings. The right-hander is 2-8 in 14 starts against Tampa Bay.
"After the first inning, I kept throwing it where they wanted the ball, and they never miss those pitches. It really hurt me," Matsuzaka said through an interpreter. "As always I'm disappointed in myself for not helping my team out. It's been really hard to keep the positive going so far."
Valentine didn't directly answer a question about whether Matsuzaka will make another start this season.
"We'll see what he's feeling like [Thursday]," Valentine said. "Maybe a little more rest is what's needed at this time of year."
Matsuzaka had elbow ligament replacement surgery in June 2011 and started this season on the disabled list.
Ciriaco had a leadoff single in the first, stole second, and scored on Ellsbury's single to make it 1-0. Ciriaco is 15-for-15 in stolen-base attempts this season.
- Tampa Bay LHP David Price (18-5) will go for his 19th win this season against Boston RHP Clay Buchholz (11-6) in the finale of the four-game series on Thursday night.
- Red Sox RHP Daniel Bard faced five batters. He walked three and gave up one hit.
- Aceves allowed four runs in two-plus innings.
- Justin Gatlin, the 100-meter bronze medalist at the London Olympics, threw the ceremonial first pitch.