The Texas Rangers had the perfect matchup to end a three-game losing streak on Thursday.

They had Alexi Ogando facing the Detroit Tigers.

Ogando came through again, pitching well into the seventh inning as the Texas beat Detroit 5-2 in a matchup of AL division leaders.

Ogando is 3-0 against Detroit this season while the rest of the Rangers' staff went 0-6.

"That was a very well-pitched game just when we needed it," Texas manager Ron Washington said. "That's a pretty good lineup that he held down again."

Ogando (11-5) allowed two runs in 6 1-3 innings, walking none and striking out seven. He became the first pitcher to defeat the Tigers three times this season — he has allowed three earned runs in 21 innings against Detroit for a 1.29 ERA.

"We played a good game, we pitched a good game, but Ogando was just too good for us," Tigers manager Jim Leyland said. "He wasn't in the All-Star game by accident."

Four Texas relievers finished, with Neftali Feliz pitching the ninth for his 22nd save in 27 tries. More importantly, Mike Adams pitched a scoreless eighth after taking the loss in his Rangers debut Tuesday.

"My blood pressure was way down today," said Adams, acquired from San Diego on Sunday. "The other night, I was all over the place, but today felt more comfortable."

The Rangers had lost four of five and seen their AL West lead shrink to one game.

"This was a big game for us," Mike Napoli said. "We dropped the first two here and we had to close this out with a win."

Brad Penny (7-9) took the loss, giving up five runs on 11 hits — 10 singles and Michael Young's triple — in 6 2-3 innings.

"I felt great out there — that's as strong as I've felt since I got hurt last year," he said. "Everything just went against us — every ball they hit found a hole."

The Rangers nearly hit into a triple play in the second inning, but instead turned it into a run.

With runners on first and second, Mitch Moreland hit a grounder to first baseman Don Kelly, who stepped on the bag. Kelly then threw to second and Napoli was tagged out after a brief rundown.

Nelson Cruz tried to score from second on the play, and Kelly's throw beat him, but catcher Victor Martinez dropped the ball for an error.

"I thought we had it — I really thought we had it," Leyland said. "That would have been a unique triple play, but we would have loved to have it."

Texas added three more runs in the fourth on RBI singles by Napoli and Ian Kinsler and a sacrifice fly by Endy Chavez.

With Detroit still unable to solve Ogando, the Rangers added a fifth run in the seventh. Josh Hamilton singled with two outs and scored when right fielder Ryan Raburn lost Young's flyball into the corner, turning it into a triple.

"Penny had great stuff," Young said. "We were lucky to get the runs we did."

Detroit got two runners on for the first time in the seventh, as Miguel Cabrera and Martinez started the inning with singles. Carlos Guillen popped out, but Wilson Betemit and Raburn followed with RBI singles.

That brought Darren Oliver out of the Texas bullpen, and the Tigers only got one more baserunner.

NOTES: The game drew a sold-out crowd of 40,497 for a weekday afternoon game. ... Ogando is the first non-AL Central pitcher to beat the Tigers three times in one season since Ervin Santana of the Angels in 2008. ... The Rangers return home to play Cleveland on Friday in the first of a three-game series. Derek Holland (10-4) will face Ubaldo Jimenez in his first AL start. ... The Tigers travel to Kansas City for a three-game series against Kansas City. Rick Porcello (11-6) will face Felipe Paulino (1-4) in Friday night's opener.