Taking advice from Adrian Beltre, Elvis Andrus stepped to the plate in the eighth inning with one goal in mind.

“Try to go yard,” Andrus said.

That would have completed a cycle for Andrus in a game the Texas Rangers were leading at the time — and won — by a score of 7-2 over the Detroit Tigers.

But Andrus didn’t get a hold of it and instead dunked a single into shallow right field. No shame in that, though, as it was Andrus’ fifth hit of the night, a career high.

Andrus was just one part of a good night all the way around for the Rangers. Starter Justin Grimm worked into the seventh inning and won his first game since April 26. And the offense, two days after handing Justin Verlander his shortest outing of the season, did the same courtesy to Anibal Sanchez.

It all started with Andrus, who batted in the leadoff spot with Ian Kinsler out. Andrus singled in the first inning, stole second, moved to third on a throwing error and then scored on a wild pitch.

Andrus had an RBI triple in what became a three-run second, but his biggest hit of the night might have come in the third inning.

Detroit had pulled to within 4-2 with two runs in the top half of the inning, but Texas had Sanchez on the ropes. Mitch Moreland homered to start the inning, and Andrus stepped to the plate with a runner on third and two outs.

Andrus delivered a single up the middle that made it a 6-2 game and ended Sanchez’s night after 2 2/3 innings.

Sanchez entered the game with a 2.05 ERA and had gone at least six innings in his last seven starts.

“That was huge because you cannot give those guys opportunities,” Andrus said. “As soon as you get a chance to take them down, you have to. Those are the guys if you give them another life, you’re going to face them until the eighth.

“Today and the first game [against Verlander], we did a really good job of stepping up and taking those guys out.”

Manager Ron Washington agreed, saying Sanchez could never get comfortable against the Rangers lineup as the Tigers had to go to their bullpen early for the second time in three nights.

Texas cushioned its lead against the Detroit bullpen with a single run in the sixth on an RBI double by Lance Berkman.

Grimm and three relievers made that lead stand.

Grimm, who allowed five runs in each of his previous two starts, allowed two runs on seven hits over 6 2/3 innings. He pitched in and out of trouble seemingly every inning but had a 1-2-3 inning in the fourth.