BOSTON (AP) -- The Boston Red Sox spent a lot of money during free agency to fix a slumbering offense.
A month into the season and they are still leaving tons of runners on base.
They wasted chances in the eighth and ninth innings Wednesday night, falling to the Tampa Bay Rays 5-3.
"What we continue to do is create opportunities. I know we've talked a lot about that recently, the last year-plus," Boston manager John Farrell said. "It's been a mixed bag with the end result. The bottom line is missed opportunities."
The Red Sox spent over $180 millon to sign Pablo Sandoval and Hanley Ramiez during the offseason after finishing 11th in the AL in runs scored.
Over the last six games they have gone 4 for 45 with runners in scoring position, including leaving the bases loaded in the eighth and two on in the ninth on Wednesday.
"We know what we have to do. We haven't been getting the job done. Plain and simple," struggling first baseman Mike Napoli said. "We've had people in here that have been successful in those situations."
Evan Longoria hit two solo homers and Kevin Jepsen worked out of the eighth-inning jam for the Rays.
Joey Butler had given the Rays a 4-2 lead with a two-run single in the sixth, two nights after hitting his first major-league homer.
The Red Sox cut that lead on Mookie Betts' fifth homer of the season, his third in two days, leading off the eighth against Jepsen.
After Dustin Pedroia grounded out, the Red Sox loaded the bases on a walk to David Ortiz, a single by Napoli and a walk to Sandoval. But Daniel Nava grounded to first baseman James Loney, who got the force at home. And Brock Holt grounded to Loney for the final out.
Longoria gave the Rays a cushion with his third homer of the season, a deep shot into the seats in left off Alexi Ogando in the ninth.
Brad Boxberger pitched a scoreless ninth for his seventh save.
The Rays had taken a 1-0 lead against Justin Masterson (2-1) in the third when Brandon Guyer doubled and scored on a single by Logan Forsythe.
The Red Sox went ahead 2-1 in the bottom of the inning against Alex Colome (2-0) on consecutive doubles by Xander Bogaerts and Blake Swihart and a sacrifice fly by Pedroia.
Longoria tied it in the fourth with a leadoff homer to left, his first since the season opener.
Masterson retired the leadoff batter in the fifth, then let the remaining four hitters he faced reach base. Loney singled before Longoria and David DeJesus walked, loading the bases. Butler followed with a single to right for a 4-2 lead.
Masterson, who allowed three runs or fewer in each of his last three starts, walked six, threw a wild pitch and hit a batter.
Colome, making his second start after missing a month with pneumonia, left with a runner on first and no outs in the sixth after allowing two runs, four hits and no walks with three strikeouts.
Masterson could find a bit of humor in his rough outing.
"For a while there it felt like (the movie) `Major League': `Ball four. Ball eight. Ball 12.'"
SPEED FOR BIG PAPI
Farrell didn't second guess taking Ortiz out for a pinch runner in the eighth.
"If we get a base hit and he gets thrown out at home plate, you're dammed if you do and dammed if you don't," he said.
Rays: LHP Jake McGee (offseason elbow surgery) and INF Nick Franklin (left oblique strain) both did well in rehab appearances Tuesday, according to manager Kevin Cash. ... The Rays expect to learn more about RHP Alex Cobb's pitching elbow after returning home for a four-game series against Texas starting Thursday night. The Tampa Bay Times reported he has a partial ligament tear.
Red Sox: RF Shane Victorino is scheduled to start a rehab assignment Friday at Double-A Portland. He is on the DL with a right hamstring strain. ... LF Ramirez remained day-to-day after spraining his left shoulder when he ran into the side wall in left field pursuing a fly ball on Monday.
Rays: RHP Chris Archer (3-1, 1.64 ERA) pitches against RHP Nick Martinez (2-0, 0.84) and the Texas Rangers on Thursday night in the opener of an eight-game homestand.
Red Sox: After a day off Thursday, LHP Wade Miley (1-3, 7.15) faces RHP Aaron Sanchez (2-2, 4.62) of the Toronto Blue Jays on Friday when the Red Sox open a three-city, 10-game road trip.