ST. PETERSBURG, Fla. -- Just when it looked like another Rays lead would slip away and turn into a loss, Evan Longoria hit a two-run homer with two outs in the bottom of the ninth inning, giving Tampa Bay an 8-7 victory over the San Diego Padres at Tropicana Field and bringing the Rays back to .500 for the first time in two months.
"Those are the kind of games we've been a part of lately, where we've had to really battle late in the game," Longoria said. "A win is a win; a walk-off win is even better. I'm just happy to get the opportunity and to be able to come through."
San Diego (16-20) looked to have a victory wrapped up with closer Huston Street one out from closing out a wild game that saw the Padres rally from a 6-2 deficit on Jesus Guzman's pinch-grand slam and a bases-loaded walk for a 7-6 lead in the seventh.
For all the excitement of Longoria's walk-off home run -- a franchise-high fifth of his career -- Rays manager Joe Maddon was disappointed that it took the late rally to clinch a win that could have come easier.
"I'm not happy with that. That's inappropriate. It's got to stop. We're better than that. If we want to play in October, we've got to be better than that," he said. "That cannot happen. You're not going to be lucky. You've got to be good."
The Rays (18-18) have won four in a row, matching their season high, and Longoria's winner wouldn't have been possible had Ben Zobrist not walked from a full count to keep the inning alive.
"Longo, that's wonderful, but Zobrist's at-bat set the whole thing up," Maddon said. "Zo understands the importance of not making an out. He gets it. It's not just about getting hits all the time. Some guys are so hung up on getting hits they cannot see the forest for the walk. You've got to just take it sometimes."
Three innings earlier, the Rays were on their way to an easy win, leading 6-2 and having chased rookie starter Burch Smith in the second inning when the first seven Rays reached base. James Loney hit a two-run homer, the Rays added three singles and then Matt Joyce had a two-run double.
Smith, a 23-year-old who was drafted in 2011 out of Oklahoma, gave up more earned runs (six) than the four he'd allowed in six starts at Class AA San Antonio. The six-run outburst was one run short of the Rays' best inning of the season, trumped only by a seven-run third on Monday against Toronto.
Starter Jeremy Hellickson, after allowing a two-run homer to Chase Headley in the first, had settled down, retiring 16 batters in a row until he got into trouble in the seventh.
Carlos Quentin walked -- the only one Hellickson issued while striking out eight -- and Mark Kotsay singled. And with two outs, the Padres got an infield single from Alexi Amarista to load the bases.
In came Guzman, who had been 2 for 13 as a pinch-hitter this season, and he crushed a full-count grand slam just inside the left-field foul pole to tie the score at 6. It was the first grand slam of his career, San Diego's first slam since September and the team's first pinch-grand slam since August 2006.
"It's my first grand slam in the big leagues, but we lost the game," Guzman said. "That's the conclusion. We're sad right now. I don't care if I hit a home run. We wanted a win."
That ended Hellickson's night, but reliever Jamey Wright struggled with his control, with Padres reaching bases on an error, hit by pitch and walk, then a bases-loaded walk to Quentin for a 7-6 lead.
San Diego got stellar pitching from its bullpen up until Street -- Tyson Ross threw four innings, then Brad Brach, Joe Thatcher and Luke Gregerson took it to the ninth. The Padres, also battling their way back to .500, were within an out of a tough road win.
"That's definitely a tough one. To rally like we did, come back and take the lead, but that's part of baseball," Headley said. "It's tough, but you learn to live with it and tomorrow we'll come back ready to play. It's definitely a big swing of emotions in the last couple of innings."
NOTES: Loney entered the night second in the American League with a .376 average, but as recently as Thursday he led the league, one of only four Rays to do so this late in the season, following Joyce and former Rays Jason Bartlett and B.J. Upton. ... Joyce's two-run double was a welcome show of opportunistic hitting. Joyce entered the game hitting just .182 (4-for-22) with runners in scoring position. ... Outfielder Sam Fuld started for the second game in a row, and his single continued a recent upswing. After opening the year 2-for-26 at the plate, he entered the game with a .280 average in the last 12 games. ... The Rays had 10 hits, giving them double-digit hits in 12 of their last 23 games, this after doing so just once in their first 13. In their last 23 games, the Rays lead the majors with 132 runs, or 5.7 per game. ... Longoria's fifth career walk-off is a team record. He had been tied with Upton at four.