ST. PETERSBURG, Fla. — Suddenly, the Red Sox are in a race.
Jon Lester was unable to stop Boston’s slide on Sunday and the Tampa Bay Rays cruised to a 9-1 rout, finishing a three-game sweep to move within 31/2 games of the AL wild card leaders.
Boston has lost five consecutive games, its longest skid since opening the season 0-6, and nine of 11 overall.
“We’re kind of in a fight right now, we know that,” manager Terry Francona said. “It’s not real pretty. We’ll come out and fight, and hopefully play better. I always feel like we’re going to play well and when we don’t, we’re going to fix it. I still feel that way.”
The teams play each other four more times, in a four-game series beginning Thursday night at Fenway Park. The Red Sox also dropped 31/2 games behind the first-place New York Yankees in the AL East.
“They’re frustrated,” Francona said. “We all are. That’s nothing that a good, nice, clean crisp game won’t help.”
James Shields came within two outs of his 12th complete game this season and B.J. Upton hit his first grand slam for Tampa Bay, which improved to a season-high 17 games over .500 at 81-64. The Rays have won 21 games in a row when scoring five runs or more.
“We needed to win these,” manager Joe Maddon said. “There’s no other way to look at it. Under the circumstances, you’ve got to do what we did or it’s pretty much almost impossible to recover. Our guys believe we can do this. It’s truly not impossible.”
Tampa Bay was 10 games behind the Yankees in the wild-card standings on Aug. 7.
Lester (15-7) gave up four runs and eight hits over four innings. Boston starting pitchers have gone five innings or less in nine of the last 11 games.
Lester had allowed one earned run or less in his previous five starts, going 4-0 during that stretch. The left-hander threw 43 pitches in the first and 111 overall.
“Too many pitches,” Lester said. “I didn’t have anything. It was one of those days. Just had no command of one pitch. Picked the wrong time to have one of these.”
The Red Sox did get some encouraging news: Francona said Josh Beckett, out with a sprained right ankle, is scheduled to throw off a bullpen mound Monday and did not completely rule out the right-hander from pitching Thursday.
“We’ll see how he does,” Francona said. “I think that might be a little ambitious, but I think he wants to do it, which is a good sign.”
Shields (15-10), who has won four consecutive starts en route to his career-best 15th win, allowed seven hits over 8 1-3 innings. Coming off a 5-1 complete-game victory over Texas last Monday, the right-hander was replaced by Dane De La Rosa after issuing a one-out walk in the ninth on his 121st pitch.
“We’re back in the hunt,” Shields said. “They know that we’re right behind them.”
The Rays went up 8-1 on Upton’s 20th homer in the fifth off Matt Albers.
Upton finished with four hits and walked once. He and his brother Justin of the Arizona Diamondbacks became the first set of siblings in major league history to both have 20 homers and 20 stolen bases in the same season.
“Couldn’t ask for a better day,” B.J. Upton said.
Boston is off Monday, while Tampa Bay will begin an 11-game road trip at Baltimore. Rays right-hander Jeff Niemann (9-7) will go against left-hander Zach Britton (9-9).
“I don’t think there will be a letdown,” Niemann said. “I think everyone knows what our goal is here. Take care of business. … We have to win.”
After loading the bases with no outs in the first, Tampa Bay took a 2-0 lead on Ben Zobrist’s two-run single off Lester. Sean Rodriguez made it 3-0 later in the inning with a sacrifice fly.
Rodriguez put the Rays up 4-1 with an RBI double in the third.
Marco Scutaro got the Red Sox within 3-1 on a third-inning homer. It stopped a personal stretch of 161 at-bats without a home run, dating to July 15 against Tampa Bay.
Shields worked out of a bases-loaded, one-out jam later in the third when David Ortiz flied out and Josh Reddick was retired on a foul pop.
The Red Sox had two on and one out in the second, but Jason Varitek hit a double-play grounder.
Boston’s Jacoby Ellsbury, who turned 28 on Sunday, extended his hitting streak to 16 games with a fifth-inning single.