ARLINGTON, Texas — Rougned Odor quickly atoned for his baserunning blunders with a big blast for the Texas Rangers.

Odor, thrown out on the bases twice after hits, ended it with a two-run homer to give the AL-best Rangers an 8-7 victory over the Seattle Mariners on Tuesday night.

“Fitting for Rougned to be the guy that did it, coming off a couple of baserunning situations where he was aggressive trying to make things happen, and backfired on him,” manager Jeff Banister said.

After getting thrown out trying to stretch a single to right in the seventh, in between RBI singles by Adrian Beltre and Jonathan Lucroy, the veteran Beltre got the aggressive youngster’s attention with a tap to the head in the dugout.

Then in the ninth, after Beltre’s leadoff single off closer Edwin Diaz (0-3) in his second inning, Odor hit a 2-2 drive to the hill in center field for his 25th homer.

“I was too aggressive on the bases and it was not the right situation. (Beltre) talked to me and explained to me the situation, and I just want to say thank you to him because he’s a great teammate. He teaches me little things,” Odor said. “In my last at-bat, I was just trying to help my team.”

Texas won its fourth straight and has a 10 1/2-game lead in the AL West over third-place Seattle, which has lost four straight. Houston remained 8 1/2 games back after winning earlier Tuesday against Oakland.

Right after Beltre’s homer in the third put Texas up 4-0, Odor reached second on a double-error by Mariners starter James Paxton, who bobbled the soft comebacker and then made a throwing error. But Odor was thrown out trying to steal third base, which cost the Rangers a run since Lucroy singled right after that.

The ball was right in front of Odor in the seventh when was easily thrown out by right fielder Shawn O’Malley when trying to stretch his hit into a double in the seventh.

“Look, it’s a guy trying to make a baseball play. He’s aggressive, we know that, we love that about him,” Banister said. “There is a certain margin of error in some situations.”

Matt Bush (6-2), who gave up a go-ahead sacrifice fly to Robinson Cano in the eighth, came back with a perfect ninth.

The Mariners overcame that early 4-0 deficit and pushed head against suddenly erratic All-Star lefty and AL ERA leader Cole Hamels with six runs over two innings.

“We were able to string some good at-bats together and get some runs on the board,” said Kyle Seager, who drove in two runs and scored one. “That’s a good team over there and they’ve got a lot of fight. It kind of went back and forth. Unfortunately, they got the last blow.”

OUT OF THE ZONE

Hamels needed only 27 pitches to get through the first three innings, but his 35 in the fourth included three walks — two with the bases loaded. His ERA rose from 2.67 to 2.91.

SHORT HOPS

Alex Claudio pitched 2 2-3 scoreless innings between Hamels and Bush. … Texas improved to 30-8 in one-run games with its sixth walk-off victory. … Rangers pitchers haven’t allowed a homer in their last eight games, matching Miami for the longest streak in the majors this season.

TRAINER’S ROOM

Mariners: Paxton ripped a fingernail in the third, but still pitched five innings. … DH Nelson Cruz was given the night off because of a nerve issue in his left hand that is making it difficult to grip the bat. X-rays and an MRI showed no structural damage. Cruz hurt his hand on a checked swing Sunday, and his taking medication to ease the inflammation.

Rangers: RHP Colby Lewis allowed five runs and eight hits over 3 1-3 innings in a rehab start for Double-A Frisco. He threw 41 of his 60 pitches for strikes. Lewis (strained right lat) has been out since late June.

UP NEXT

Mariners: Felix Hernandez (9-4) pitches against Texas for the first time since this year’s season’s opener, when he gave up only one hit but walked five in six innings in a 3-2 loss. He faced the Rangers five times last season.

Rangers: Martin Perez (8-10) has lost his last two starts, allowing 12 runs in 11 2-3 innings. The lefty is 1-6 his last 10 starts.