SEATTLE (AP) -- Two days after his baserunning error cost Tampa Bay, Sean Rodriguez atoned for his mistake with a key pinch hit.

Rodriguez hit a go-ahead single in the eighth inning on Sunday and the Rays rallied past the Seattle Mariners 4-1 Sunday to build their wild-card edge.

''I (will) definitely sleep better now,'' said a relieved Rodriguez about the cross country flight home. ''Considering that happened only two days ago, you don't usually get an opportunity right away. That's instant gratification. Instant redemption. I'm very fortunate.''

Rodriguez had been picked off second late in the game on Friday in the Rays' loss that night.

The Rays lead Baltimore and Cleveland, who both lost, by two games for the second AL wild-card spot.

Trailing 1-0, Tampa Bay scored three times in the eighth. Evan Longoria was hit by a pitch from Yoervis Medina (4-5) to start the inning and Luke Scott walked. James Loney followed with a tying double that landed just inside the right-field line.

Rodriguez, hitting for Matt Joyce, singled sharply up the middle off new reliever Oliver Perez to score Scott. Loney also came home when center fielder Abraham Almonte bobbled the ball for an error.

The Rays began their 10-game road trip in sole possession of the first wild-card spot and a four-game lead on the second position. Tampa Bay completed the swing at just 3-7. The Rays contend, though, that the record on the road trip is less important than the momentum they grabbed with the win Sunday.

''The thing is, everybody goes through bad moments,'' Rays manager Joe Maddon said. ''Everybody does. Every team out there's gone through bad moments this year. Ours is just occurring right now. A lot of it is it's a tough trip. It's a tough trip.

''So it was kind of a buzz saw moment. We kind of survived it in a sense. We get to go back home. Again, of course you got to believe. I believe every moment of every day. I never lost faith in any of this. You're just looking for that moment when you can break through again. It (happened) today.''

''Had really good fastball velocity, I thought he maintained it pretty much the entire gamem,'' Maddon said. ''Curveball and changeup were there, but I think he actually pitched with his fastball well today.''

Jake McGee (4-3) got two outs and the win. Fernando Rodney closed for his 33rd save in 41 chances.

The Rays picked up an insurance run in the ninth on an RBI double by Desmond Jennings, but still left the bases loaded. Tampa Bay also squandered a chance with the bags full in the seventh, as pinch-hitter Delmon Young grounded into a double play and Ben Zobrist flew out to end the frame without putting a run on the board.

The Rays went 4 for 10 with runners in scoring position on Sunday, but still only hit .177 (17 for 96) in those spots during the road trip.

Mariners starter Erasmo Ramirez pitched into the seventh, blanking the Rays on four hits and working around four walks.

''I thought Erasmo was good,'' Mariners skipper Eric Wedge said. ''I loved his aggressiveness early in the game and he was able to hang on to it and sustain it.''

Kendrys Morales led off the Seattle second with his 20th homer of the season and 99th of his career. It was just one of five hits the Mariners were able to record.

NOTES: Rays SS Yunel Escobar did not start for the first time since July 21. He pinch-hit in the eighth. Maddon said Sunday's pitching matchup gave him a good excuse to sit Escobar, who he wants to keep from completely wearing down by the end of the season. ... Seattle 2B Nick Franklin was not in the lineup on Sunday, a day after taking a knee to the head while attempting to field a fly ball. Wedge said the decision was not entirely based on Saturday's collision, though, and Franklin is fine. Franklin struck out pinch-hitting in the ninth.