ARLINGTON, Texas -- €“ A huge homestand didn't get started off on the right foot for the Texas Rangers Friday night against the Tampa Bay Rays.

There was a review that went against the Rangers in the third inning, which is becoming a common occurrence. And then there was the highlight play by Tampa Bay centerfielder Kevin Kiermaier, who pulled back a certain homer from Prince Fielder to end the fifth inning with the Rangers trailing 3-2.

But on a night that seemed destined to go against the Rangers, one swing in the seventh inning turned things around.

That's when Delino DeShields smashed a solo homer – the first of his career – to tie the game at 3 and give the Rangers life. Texas followed that up with two runs in the eighth to take the lead for good on its way to a 5-3 win.

The win moved the Rangers back to .500 and pulled them within ½ game of Tampa Bay in a crowded wild-card picture. It also gave the Rangers consecutive come-from-behind wins and their eighth win in their last nine games at Globe Life Park.

The spark came from a player who hadn't homered this year, with his only home run with the Rangers coming in a spring training game against Colorado.

That changed when he got a 3-1 fastball from Steve Keltz.

"The situation I'm in, the role I'm playing is to get on base, to score runs and do the small stuff to help the team win," DeShields said. "In that situation we were down one with two outs and I was like 'Now might be the right time to try and get ahold of one but not do too much.' I just stayed within myself and didn't get too big. I got the pitch I wanted and I touched it pretty nice. Off the bat I knew it was gone. It felt good. I haven't felt that in a long time."

The Rangers put the game away with more traditional offensive threats accounting for the runs in the eighth inning. A single from Adrian Beltre and then heads-up baserunning from both Beltre and Mitch Moreland put runners on second and third with no outs for Josh Hamilton.

Hamilton, who sacked a homer in the second inning, put Texas up 4-3 with a sacrifice fly off Jake McGee and then Elvis Andrus scored Moreland with an RBI single to complete the scoring.

It was Hamilton's first game since missing two in Minnesota because of a sore left knee. It didn't look like it bothered him Friday as his homer went an estimated 437 feet.

"It has been a while since I hit one like that," Hamilton said. "It felt good. I felt like I had some good at-bats tonight and got the barrel on the ball. I feel like I want to be out there for the team and the organization. I need to be out there, get at-bats and get better at the plate."

The clutch offense came on a night the Rangers got a quality start from Martin Perez, who allowed three runs in six innings. He had a 2-1 lead after two innings but started rushing things in the third and was touched for two runs. But he settled down after that and was able to work out of a bases-loaded jam in the sixth inning to get the ball to the bullpen with Texas still trailing by one run.

The combination of Sam Dyson and Shawn Tolleson were along for the ride behind the late-game hitting with Dyson picking up the win and Tolleson the save.

Now the Rangers have to see if what they've done over the last two days can carry over.

"You've got to win those type games if your goal is to where this team is," said Moreland, who also started a nifty double play in the seventh after the Rays opened in the inning with a Curt Casali double. "Us coming out the last couple of days and showing that resilience and battling and fighting for all 27 outs, that just proves that's what we're trying to do."


- PHOTOS: Cowboys Cheerleaders Auditions

- Ranking NFL quarterback salaries

- Highest paid player on every NFL team

- College football's biggest video boards