After being shut out through seven innings, puncuated by a wasted bases-loaded opportunity, the Rays looked headed to another dejecting loss.

But James Loney gave Tampa Bay the big hit it appeared would never come, and Sean Rodriguez blasted a two-run single for the lead. The Rays tacked on another run in the ninth for a 4-1 victory.

After a 2-7 start to the West Coast trip not only did the Rays get a victory, they padded their lead in the Wild Card standings for the second spot as both Cleveland and Baltimore lost.

Tampa Bay trails Texas by three games for the first spot and is up two games on the Indians and Orioles.

Matt Moore allowed just Kendrys Morales' solo homer in the second inning, and settled down after a rough start to pitch into the seventh. He walked three, struck three and gave up five hits. Jake McGee retired the two batters he faced and got the win when Tampa Bay put up its three-spot in the eighth.

In the top of the seventh the Rays loaded the bases on a pair of walks sandwiched around Jose Lobaton's single. But Delmon Young, in to pinch-hit, produced a weak dribbler that pitcher Charlie Furbush turned into a home-to-first double play.

Finally things went the Rays' way in the eighth and M's reliever Yeorvis Medina gets some of the credit. He plunked Evan Longoria with the first pitch then walked Luke Scott on five. That's when Loney lined a double to left making it 1-1.

With the runners on second and third Rodriguez smashed the go-ahead hit off Oliver Perez.

Tampa Bay added the fourh run on Desmond Jennings' single in the ninth, which came after Chris Giminez was called out at home on a Ben Zobrist single -- replay showed Giminez avoided the tag.