ST. PETERSBURG -- Nobody in the ballpark expected Wil Myers' poke down the right-field line to stay fair.
Fortune had not favored the Rays recently, particularly in the first two games of this week's series against the Red Sox. So expectations were low as the baseball fell to the ground with two outs in the eighth inning of a tied ballgame.
Negative vibes aside, fate finally flipped in the Rays' direction.
Myers' ball ducked into fair territory just inside the line and Evan Longoria scampered home with the winning run Thursday night as the Rays dodged a three-game sweep to the Red Sox with a 4-3 win at Tropicana Field.
"I saw it," said Longoria. "When he hit it, I had a real strong gut feeling that it was going to stay fair. It's tough to not dwell on those moments, because we've had an infinite number of balls that were hit that could have gone in a different direction. For one to fall tonight in a crucial game for us will hopefully turn the tide."
The Rays (79-66) won for just the second time in their past seven games, moving back to within 8 1/2 games of the American League East-leading Red Sox while keeping a one-game lead over the Yankees for the second AL Wild Card spot.
After taking a first-pitch strike, Longoria changed bats and hit a ground-rule double off Rubby De La Rosa with one out in the eighth. Matt Joyce then popped out to bring Myers to the plate.
The rookie outfielder fouled off De La Rosa's first offering before slapping a 97-mph fastball for the game-winning double.
"As soon as I hit it, I knew it was going to fall," Myers said. "I wasn't sure if it was going to be fair or not, but as it was coming down, I thought it had a chance. And sure enough, honestly, I think it hit the line. Maybe that's some luck turning around for us. I just think it was a big win for the whole team."
The win could not have come at a better time after Tampa Bay took a 2-0 loss Tuesday night, despite a lights-out performance by David Price, followed by Wednesday night's 7-3 loss in extra innings.
Myers' hit changed all of that, at least for the time being, allowing the Rays to get back into the win column for the first time since Sunday in Seattle. With 17 games remaining, the Rays will head to Minnesota for a weekend series in the hopes they have changed their fortunes.
"We needed it bad," Myers said. "We needed a win bad. 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."
Added manager Joe Maddon: "There's always these little moments that occur, and it is about inches, whether it goes your way or not, and finally we got a break tonight."
Myers and Longoria led the Rays' offense, with Myers twice driving home Longoria after Longoria tripled and doubled, and Desmond Jennings chipped in with a solo home run, his 13th of the season.
Meanwhile, Jeremy Hellickson started for the Rays and had a strong outing in his second start since missing a turn in the rotation to regroup. Though the right-hander pitched just 5 1/3 innings and allowed solo home runs to Jarrod Saltalamacchia and David Ortiz, he looked more like the Hellickson that went 8-1 with a 3.17 ERA from June 2-July 26 than the one who went 0-4 with a 9.15 ERA in five August starts.
"It feels good," said Hellickson, who got a no-decision. "It feels better because we pulled this one out. I felt very good about tonight's start.
"I'm trying to get back to what I was doing when things were going good. That was commanding the fastball down and letting my changeup work off that, getting ahead of guys. I thought I did a good job for the most part. I made a few pretty bad pitches, but I felt good about tonight."
Jake McGee pitched a scoreless eighth to earn his fifth win. Fernando Rodney had some excitement in the ninth en route to his 34th save, but he managed to get Dustin Pedroia to pop out to shortstop with two aboard for the final out.
Though the Red Sox lost Thursday night, they won the season series, 12-7, their most wins in a season against the Rays since the 2007 Red Sox won 13.
"We continue to play a very good brand of baseball," Boston manager John Farrell said. "We're executing, for the most part, in key moments. We come ready to get after it every single night."
The Sox managed to dominate the series even though they hit just .208 against the Rays this year.
"This series, this whole season is lopsided in regard to wins and losses, but it's been a lot closer than that," Maddon said. "We're really looking forward to playing them in the playoffs."
Bill Chastain is a reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.