ARLINGTON, Texas (AP) -- For Evan Longoria and the Tampa Bay Rays, this was a fitting way to get back into the playoffs.
They earned their postseason berth in the final game of the regular season for the second time in three years, needing an extra game to do so this time.
And their 5-2 victory in the AL wild-card tiebreaker Monday night came against the Texas Rangers, the team that knocked the Rays out the playoffs their last two trips.
"It feels really good to be able to leave here celebrating instead of with our heads down," said Longoria, who had a two-run homer among his three hits and scored another run.
"It sure feels good to get them after so many times they've knocked us out," Ben Zobrist said.
David Price (10-8), the reigning AL Cy Young winner, threw his fourth complete game this season. He struck out four and walked one, and even picked off two runners while allowing seven hits, striking out four and walking one. He threw 81 of 118 pitches for strikes.
The Rays face another must-win situation Wednesday night at Cleveland in the AL wild-card game, Tampa's third game in three cities in a four-day stretch. The winner faces Boston in the division series.
In the visitor clubhouse at Rangers Ballpark, the Rays were chanting "One More Game! One More Game!" while spraying each other with champagne.
"We feel like we've played the same game in the last week like 12 times," Zobrist said. "It just feels like every game is that important. ... Let's just get to the next game and we'll worry about that then."
Tampa Bay won eight of 10 games to get into the first wild-card tiebreaker in the majors since 2007.
Texas had to win seven in a row to force an extra game. Eight was too much for the Rangers, whose season ended in their 163rd game for the second year in a row - this time without even getting to the playoffs.
"What goes through my mind? We're going home," third baseman Adrian Beltre said. "We expected to be in the playoffs. But we didn't play well enough."
While the Rangers had a last-week surge to extend their regular season, they were done in by a 5-15 start to September after beginning the final month with a two-game lead in the AL West.
"We just didn't get it done. I've got no excuse for that," manager Ron Washington said.
Texas had beaten the Rays in the AL division series in 2010 and 2011 on way to its only two World Series. The Rangers then lost to Baltimore in the first AL wild-card game last October after another late-season slide.
The return of All-Star slugger Nelson Cruz from his 50-game drug suspension wasn't enough for Texas.
Cruz, who had 27 homers and 76 RBIs in 108 games before his suspension, was 0 for 4 with a strikeout while batting sixth as the designated hitter. When he grounded out to short to end the game, Price and Longoria locked eyes before embracing to start the celebration.
When Price woke up Monday, all he could think about was throwing a complete game, then getting that last out and turning straight to Longoria.
"You're probably supposed to go to your catcher first, but for what he's done for us and what he's done for me personally," Price said.
The first four hitters in the game against Rangers rookie left-hander Martin Perez (10-6) combined for three singles and a walk, and yet the Rays still didn't have a run.
Desmond Jennings, in his first start in more than a week after left hamstring tightness, hit the game's first pitch down the left-field line. He was thrown out trying to stretch the hit to a double when Craig Gentry made a strong throw.
Wil Myers walked on four pitches. Consecutive singles by Zobrist and Longoria loaded the bases and Delmon Young hit a sacrifice fly to push a run across.
Jennings had a leadoff walk in the third, and there were two outs before Longoria hit a drive to right-center that landed in the Rangers bullpen.
After Perez struck out Zobrist to start the sixth, the eighth consecutive batter he retired, Alexi Ogando gave up a double to Longoria, who scored on a double by pinch-hitter David DeJesus for a 4-1 lead.
Elvis Andrus walked on four pitches in the first, but was picked off by Price. Ian Kinsler had an RBI single in the third, but was caught stealing after straying off the base and drawing a throw.
"That's the way we play. Sometimes that's the result of it," Washington said. "If everything would have worked the way we wanted it to work when they decided to steal it would have been nice. ... They made the plays to stop it."
NOTES: The Rays could have had another run in the seventh, but umpires ruled that Rangers CF Leonys Martin made a diving, inning-ending catch of Young's soft flyball. Replays clearly showed that the ball bounced. ... Longoria is hitting .579 (11 for 19) in the last games of the regular season, with seven homers and 10 RBIs, according to STATS.