ST. PETERSBURG Friday began with a loss for the Rays, in terms of All-Star third baseman Evan Longoria being out until possibly the middle of next week with a strained left quad. But the Rays ended the evening gaining quite a bit in their 5-3 victory over the last-place Mariners in front of 17,840 at Tropicana Field. They got an encouraging start by right-hander Jeff Niemann, who gave up three runs over 52/3 innings in his best outing and first win since coming off the disabled list. 'I felt great,' he said, 'felt back to normal.' They received a lift from Willy Aybar, Longoria's replacement in the cleanup spot, as he knocked in the go-ahead run with a single during the Rays' three-run fifth. They witnessed a club record, with Rafael Soriano's 44th save (among 47 chances) of the year. But most important, Tampa Bay gained ground in the standings, moving back into sole possession of first place in the American League East thanks to the Yankees' 10-8 loss to the Red Sox. The Rays (92-61) lead by a half-game with nine left. They lowered the magic number for reaching the playoffs to three and tied the Twins, who lost 10-1 to the Tigers, for the best record in the AL. For Niemann (11-7), the win, which snapped a career-long losing streak, meant a lot. He entered Friday 0-4 with a 14.43 ERA in five starts since coming off the DL with a right shoulder strain. His struggles hurt his chances at making the postseason rotation. Niemann was far from dominant against Seattle but looked better, working his way out of a couple of key jams in a 79-pitch outing. 'I feel like we're there,' Niemann said. 'We scuffled a little bit, pitching bad and not having the ball bounce your way. But (Friday), everything fell back into place and we got it done.' The Rays continued their seasonlong success against left-handed starters (improving to 36-17 against them). B.J. Upton and Jason Bartlett served as catalysts atop the lineup, combining for three hits and three runs. Upton scored the go-ahead run in the fifth inning on Aybar's single, and the Rays added two more. That was more than enough for Niemann, who received a nice ovation after being relieved with two outs in the sixth by Randy Choate. 'Overall, better command of everything,' manager Joe Maddon said of Niemann. 'Better presence on the mound, he looked a lot more confident.' The bullpen threw 31/3 scoreless innings, including Soriano, who passed Roberto Hernandez's record of 43 set in 1999. 'He's just locked that thing down,' Maddon said of Soriano in the ninth inning. 'I think that he totally changed the fabric of our bullpen and has permitted us to be this good.' . fast facts AL East standings W L GB Rays 92 61 Yankees 92 62 1/2 Rays' magic number 3 Combination of Rays wins and Red Sox losses needed to clinch a postseason berth. . fast facts AL East standings W L GB Rays 92 61 Yankees 92 62 1/2 Rays' magic number 3 Combination of Rays wins and Red Sox losses needed to clinch a postseason berth. 