ARLINGTON, Texas (AP) — Rougned Odor was ready to hit for the Texas Rangers with the bases loaded in the bottom of the 10th inning. He instead ended the game by getting hit.

Odor was hit by a pitch, forcing in the winning run and capping a three-run rally that gave the AL-best Rangers a 5-4 victory over the Oakland Athletics on Tuesday night.

Recent acquisition Carlos Beltran tied the game at 4-all with his fourth hit, a two-run single, after John Axford (4-4) had walked the bases loaded. Marc Rzepczynski then came on and the A’s opted to intentionally walk Adrian Beltre, who hit a grand slam in the series opener Monday, to reload the bases with one out. The next pitch hit Odor on the shoulder.

“The pitch he threw me was really, really in,” Odor said. “And I was like, `I’m not going to move. I’ll take that pitch, and we’ll win the game.”‘

Rzepczynski, who primarily throws sinkers into lefties like Odor, was trying to induce an inning-ending double play grounder.

“I threw one and it ran instead of sank. And it ran right into his shoulder,” the lefty reliever said. “That sums it up right there.”

Oakland had tied the game in the ninth off closer Sam Dyson, then took a 4-2 lead in the 10th when five of its first six batters reached against Keone Kela (4-1), the sixth Texas pitcher.

Dyson struck out the side in the ninth, but also gave up three hits and a run for his fourth blown save in 31 chances. The A’s had been 0 for 9 with runners in scoring position before Danny Valencia’s two-out RBI single tied the game at 2.

Kela, the sixth Texas pitcher, got all three of his outs on strikeouts, between three hits and a walk.

The A’s lost their fourth straight, dropping a season-high 16 games under .500. At 52-68, they are 18 1/2 games behind Texas in the AL West after their 19th loss this season in which they led the game by multiple runs.

Texas (71-50) has won nine of 13 after its first game-ending hit by pitch with the bases loaded since Sept. 11, 2010, against the New York Yankees.

“Since I’ve joined the ballclub I have seen the energy in the clubhouse and the energy in the dugout day in and day out,” said Beltran, the 39-year-old switch-hitter traded from the Yankees two weeks ago. “They could be three runs behind or four runs behind and feel they can come back. Having that attitude is really great to see for me.”

Rangers manager Jeff Banister said he felt “no deflation whatsoever” from his players in the dugout even after the A’s tied the game in the ninth and went ahead in the 10th when Yonder Alonso had an RBI double and scored on Ryon Healy’s single.

“I don’t think it’s in their DNA,” Banister said after his team’s MLB-best 38th come-from-behind victory. “They’re going to continue to grind.