St. Petersburg, FL (Sports Network) - James Loney's pinch-hit solo homer in the bottom of the ninth inning capped a late rally that propelled the Tampa Bay Rays to a 5-4 victory over the Baltimore Orioles and a four-game series sweep at Tropicana Field. The Rays had previously battled back from a 4-2 deficit by scoring twice in the seventh, and Loney's liner into the seats off Tommy Hunter (6-5) sent the Orioles to a deflating loss that has the club's playoff hopes hanging by a thread. Baltimore, which has now dropped five in a row overall, trails Cleveland by five games for the AL's second wild card spot with just six remaining. The Orioles suffered another damaging setback during the game, as All-Star third baseman Manny Machado had to be carted off the field after injuring his left leg during the seventh inning. Wil Myers went 2-for-4 with two RBI in the win, which put the Rays a game above the Indians atop the wild card standings. Jose Molina also had two hits, including a run-scoring double. Machado had gone 2-for-4 with a run scored prior to exiting, while Chris Davis clubbed his 52nd homer of the season -- a two-run shot in the fourth inning -- for Baltimore. Brian Roberts added a solo homer in defeat.