ARLINGTON, Texas — Colby Lewis has been a successful postseason pitcher for the Rangers, and the veteran right-hander is trying to get back on track with Texas closing in on another AL West title.

Lewis struggled at times with his control, including three of his five walks in the same inning, and the Rangers lost 5-2 Sunday to the Oakland Athletics in only his second start since a two-month stay on the disabled list.

“I just didn’t make pitches. … I felt great,” Lewis said. “It’s on me. I want to use a word I shouldn’t use on camera. It’s junk. Yeah, the sixth inning was junk.”

With two weeks left in the regular season, the magic number for the AL-leading Rangers (88-62) to clinch the division title remained at five games. They lead second-place Seattle by 8 ½ games in the AL West.

Khris Davis homered twice for the A’s, giving him 40 for the season — 10 of them in 15 games against the Rangers.

Lewis (6-3) gave up three runs in 5 1/3 innings, allowing three hits and five walks over 92 pitches (48 strikes). But the 36-year-old pitcher got through the outing with no apparent issues after missing so much time with a strained right lat.

“I feel confident that Colby’s healthy, and I feel confident that he’s going to get things locked in and be a quality pitcher for us,” manager Jeff Banister said.

Ross Detwiler (2-3) went 5 1/3 innings and limited the Rangers to two runs after going 0-3 with a 6.75 ERA in his previous six games for the A’s. Ryan Dull pitched the ninth for his third save in five chances.

Davis lined a solo shot to left field in the fourth to match Oakland’s single-season team record for homers against the Rangers (Reggie Jackson’s nine in 1974). Davis broke that mark when he went the opposite way in the eighth, a two-run shot to right off Keone Kela that also pushed his RBI total to 99.

Davis is the first A’s player to hit 40 homers since Jason Giambi had 43 in 2000.

“It’s pretty cool. I’m proud of myself,” Davis said. “At the same time, we’ve still got a couple more weeks. I don’t know why 45 is out of the question.”

Texas got its runs with four consecutive hits off Detwiler with one out in the third. Delino DeShields had an RBI single and scored when Ian Desmond hit a sharp grounder that ricocheted of Detwiler’s knee into foul territory.

It was the 17th start overall this season for Lewis, who is 4-1 with a 2.34 ERA in eight postseason starts for the Rangers, including Game 6 of the 2010 AL Championship Series that clinched the franchise’s first World Series berth.

Lewis had three walks in the sixth, the last to Marcus Semien with the bases loaded to force in a run and tie the game at 2. The A’s went ahead when Renato Nunez greeted reliever Alex Claudio with a fielder’s choice grounder that drove in a run.

“That loss, it’s definitely on my back. I take full responsibility for it,” Lewis said. “If I did my job we’re having a different conversation.”

SUCCESSFUL TRIP

While already guaranteed consecutive losing seasons for the first time since 2007-09, the A’s (66-83) won two of three in Texas to wrap up a 6-1 road trip in which they scored 65 runs. The only loss was when Texas scored twice with two outs in the ninth inning Friday night.

QUICK RUNNER VS LEWIS

When Lewis last faced Oakland on June 16, he retired the game’s first 23 batters before a two-out walk in the eighth, and didn’t give up a hit until a leadoff double in the ninth. On Sunday, Joey Wendle reached with bunt single on the game’s first pitch, and Lewis then walked Danny Valencia before striking out the next three batters to get out of the first inning without giving up a run. Lewis made only one more start after that June start against the A’s before going on the DL.

NOTHING DEEP

The Rangers’ streak of 18 consecutive games with a homer, the third-longest in team history, ended.

UP NEXT

Athletics: Oakland starts its final homestand of the season on Monday night against Houston.

Rangers: Texas stays home with lefty Martin Perez (10-10), who has a 1.96 ERA his past three starts, starting the opener of a three-game series against the Los Angeles Angels.