"The ugly wins count as wins, too," Rays manager Joe Maddon said. "We did not play well at all tonight. We pitched well. We did not play well. We had way too many mistakes. If we're going to get to the promised land, we can not make those mistakes. We can not."
The Rays overcame a pair of costly fielding miscues and an exciting ninth inning by their closer to take a 6-4 win over the Marlins in front of a crowd of 12,352 at Dolphin Stadium.
The win kept the Rays a game behind the American League East-leading Red Sox, who took a 5-4 come-from-behind win over the Diamondbacks on Tuesday night. In addition, the Rays kick-started a six-game road trip against the Marlins and Pirates with a much-needed win.
After squandering several early opportunities, the Rays loaded the bases with no outs in the eighth off Florida reliever Renyel Pinto in less than conventional fashion.
Akinori Iwamura singled to lead off the inning before Willy Aybar dropped a bunt down the third-base line that Marlins third baseman Jorge Cantu let go, hoping the ball would go foul. Instead, the ball continued to roll right up the line until it hit third base. Carl Crawford followed with a chopper to first baseman Mike Jacobs and beat Pinto to first base for a single.
The Marlins appeared like they might escape the jam after getting consecutive force outs at home before Dioner Navarro and Eric Hinske both walked to drive in the tying and go-ahead runs for a 4-3 lead.
"I got into a good hitter's count and I was just trying to make something happen," Navarro said. "And I did it. I battled and battled, and I walked and we got the lead. It feels good."
Evan Longoria doubled home two more runs in the ninth to push the Rays lead to three runs.
The happy ending erased two tough plays that took place earlier in the game.
With two outs in the fourth inning, Rays starter Andy Sonnanstine got the popup he needed to end the inning, only Longoria lost the ball in the lights and shortstop Jason Bartlett could not make the play. The ball dropped in for a single by Marlins pitcher Scott Olsen and a run scored to tie the game at 2.
Once again the Rays had fielding troubles in the seventh when Cantu hit a ball to left field that Crawford could not handle. The ball proved to be equally slippery to B.J. Upton, who backed up Crawford on the play. By the time the ball finally got returned to the infield, Jeremy Hermida had scored from first base to give the Marlins a 3-2 lead.
"The popup, people lose balls in the twilight all the time," Maddon said. "I've seen it happen to a lot of people. I'm not even concerned about that. ... We can't permit Hermida to score from first base on a single from left field. We can't."
Tuesday night's final hurdle came in the ninth when closer Troy Percival entered the game to try to protect a 6-3 lead. You could say the performance might have been a little rough around the edges -- four walks -- but in the end, Percival got the three outs he needed to earn his 18th save of the season.
Percival said he was not good on Tuesday night "plain and simple."
"I was having a hard time with the mound, I was having a hard time getting over my front leg and throwing strikes," Percival said. "It was one of those nights where you got to battle through and I had to go to my offspeed [pitches]."
Percival missed 12 games with a left hamstring injury before returning to the team on June 12. Seeing him struggle brought questions about the veteran right-hander's health.
"My arm feels fantastic, everything feels good," Percival said. "My leg is still a little bit weak so I have a tough time getting out on top of it. ... It's nothing I can't deal with. I just have to find a better way to get out in front."
Tuesday's win -- though not aesthetically pleasing -- felt particularly good coming on the heels of a series loss to the Astros over the weekend.
"I don't think we played particularly bad against Houston and we lost two out of three, so you have to take what you get," Percival said. "This is a good team. We are going to rebound and start playing even better."
Added Navarro: "Tomorrow in the paper, it's going to say 'W.' That's all that matters."
Bill Chastain is a reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.