ST. PETERSBURG, Fla. -- Amid a recent losing streak and free fall in the standings, Tampa Bay manager Joe Maddon often pointed out that the Rays were simply losing the "battle of inches."
But in the biggest moment of what Rays third baseman Evan Longoria called "basically a must-win game," the battle finally swung back in Tampa Bay's direction.
Rookie Wil Myers hit a fly ball that dropped six inches inside the foul line in right field, driving in the tiebreaking run in the eighth inning and leading Tampa Bay to a 4-3 win over Boston on Thursday night.
"Maybe that's some luck turning around for us," Myers said. "With the wild card getting tight, we needed a win here. We didn't want to get swept by those guys, so I think that was a good team win."
The Rays had lost five of their past six games as the Red Sox padded their lead in the American League East. Boston's division lead still stands at 8 1/2 games, but Tampa Bay moved within two games of the Texas Rangers for the first AL wild-card spot.
It seemed as if the Rays might drop another close one and fall farther behind in the muddled AL wild-card race. They'd already missed a prime scoring opportunity in the fifth inning and let the Red Sox tie the score in the sixth.
But with two outs in the eighth and Longoria on second base, Myers hit a 97 mph fastball from reliever Rubby De La Rosa into the outfield.
Maddon said he was waiting to see first-base umpire Gary Cederstrom signal it fair. Myers said he was "just hoping." A few inches to the right and it would have fallen foul. A little farther to the left and it might have been caught. Instead, it found fair territory and brought home Longoria to give the Rays the lead.
"I would say 'Hallelujah' is a pretty good word there," Maddon said. "You can't will something to occur. But Wil did occur tonight, right down the right-field line."
Longoria and Myers also teamed up for the Rays' first run against starter Jake Peavy. Longoria led off the second with a triple to right field and scored on Myers' single up the middle to give the Rays their first lead of the series.
"Just didn't have great command," Peavy said. "Stuff was good, just didn't throw enough strikes to pitch deeper into the ballgame."
Jarrod Saltalamacchia and Desmond Jennings traded solo home runs in the fourth inning, putting the Rays ahead 3-1. But Tampa Bay wasted two walks to start the fifth, and Boston erased the two-run deficit in the sixth with David Ortiz's opposite-field home run off starter Jeremy Hellickson and Stephen Drew's tying RBI double against reliever Jamey Wright.
"We played a very good series," Red Sox manager John Farrell said. "We continue to play a very good brand of baseball. We're executing, for the most part, in key moments."
But for what felt like the first time in quite a while, the Rays executed in the biggest moment of the night, escaping with only one win in a three-game series but believing it could reverse their luck and propel them toward the playoffs.
"This is the kind of thing, I think, that can push in the positive direction," Maddon said. "We've been fighting so hard for this moment. We got it tonight.
"We're really looking forward to playing them in the playoffs."
NOTES: The Rays are 62-19 this season when scoring four runs or more and just 17-47 when scoring three or fewer. ... The Red Sox still won the season series 12-7, the most wins for Boston against Tampa Bay since 2007 (13). ... Rays C Jose Molina was not with the team as he traveled to St. Louis to be with his mother, Gladys, who was recovering from a surgical procedure. Molina is expected to rejoin the Rays on Friday in Minnesota. ... The Red Sox announced plans to pay tribute to Yankees closer Mariano Rivera in a pregame ceremony on Sunday at Fenway Park, the 43-year-old's last regular-season game in Boston. ... The Red Sox headed home Thursday night to begin their final homestand, a 10-day, nine-game stretch against the New York Yankees, Baltimore Orioles and Toronto Blue Jays. ... The Rays will travel to Target Field for a three-game series against the Minnesota Twins before returning home for eight games against the Texas Rangers and Orioles.