In a perfect world James Loney would have been batting in the bottom of the ninth inning Wednesday with the winning run at third base and the losing streak on the ropes.

But the Rays world has been far from perfect during the last week so it was Jason Bourgeois standing at the plate the fifth outfielder who's on the roster because Desmond Jennings is on the disabled list and was in the game because Loney was lifted for Bourgeois the previous inning when the Rays were looking to at the very least tie the score.

And wouldn't you know it Bourgeois came through.

His single to right field scored Matt Joyce and capped a ninth inning comeback that snapped the losing streak and sent the Rays dancing into the night with a 5-4 victory against the Mariners.

“How that whole thing plays out how about it? We have to run for Loney just because you're trying to tie the game at that point and he comes around and becomes the hero” Rays manager Joe Maddon said.

The Rays snapped their six-game losing streak their longest since they lost the first six games of the 2011 season. And they picked up a game on the first place Red Sox who lost in Toronto just as the Rays were mounting their comeback.

Asked if it was the type of win that could lead to better things Maddon said “I want to hope so. That's what you're looking for. It's almost never easy when things are getting a little bit awkward. It normally takes an awkward game to win in order to get you back on task or on track.”

It was awkward that's for sure.

David Price making his first career start against Seattle did not have one of his better outings since returning from the disabled list. He allowed all four Mariner runs to score with two outs.

The Rays inability to hit with runners in scoring position continued through the first eight innings. They were 2-for-10 with RISP after leaving the bases-loaded in the eighth.

It looked bleak … again. Especially after the first place Red Sox rallied with two in the ninth in Toronto to send that game into extra innings.

“You look for days like (Wednesday) that catapult you forward and kind of turn it around turn it in the right direction and get the guys believing again” Evan Longoria said.

The Rays trailed 4-1 when Wil Myers followed a leadoff double by Longoria in the sixth inning with a two-run homer. It was the ninth homer of the year for the rookie and it snapped an 0-for-15 slump.

The Rays had a golden opportunity to take the lead in the eighth inning when they loaded the bases on three walks. The first was to Loney and that's when Bourgeois entered the game as a pinch-runner.

“All those guys (in the eighth) we just had to keep moving the conga line to try and get it back to the top of the batting order” Maddon said. “Even if you don't score prior to that moment you have keep it moving so the proper guys get up.”