MINNEAPOLIS (AP) The Cleveland Indians kept their edge in the AL wild-card race. They might've lost their struggling closer.

Reliever Joe Smith struck out pinch-hitter Oswaldo Arcia to stop a ninth-inning rally by Minnesota, and the Indians won their seventh straight game, holding off the Twins 6-5 on Thursday night after Chris Perez gave up four runs in the final frame.

``It didn't go as planned, but the good news is we won, and that's what we set out to do,'' a rattled manager Terry Francona said. ``That got a little closer than we wanted.''

Cleveland leads Texas by one game for the second wild-card spot. Each team has three games left in the regular season. Tampa Bay is on top in the chase, one game ahead of the Indians.

Bryan Shaw (7-3) picked up the victory in relief of Zach McAllister by getting five key outs over the fifth and sixth innings. Yan Gomes hit a towering two-run homer off Twins starter Andrew Albers (2-5), and Michael Brantley added three hits and two RBIs from the leadoff spot. The Indians were cruising again until Perez came in for what looked like mop-up duty in the ninth.

But Alex Presley hit an RBI triple, Brian Dozier drove in another run with a groundout, Josmil Pinto hit a two-run homer and suddenly the Twins were within one. Smith entered and gave up an infield single and a walk before fanning Arcia on three pitches for his third save.

Perez has walked a tightrope on and off the field this season, and most of the time he's been in the news it's been negative. The most glaring this year was his arrest for a marijuana delivery to his house. Francona measured his words carefully after the game when asked about Perez's status as the closer, but he hinted at a change.

``You know what? I think we'll always figure out a way to win. That's kind of the way I always view it,'' Francona said.

Smith, Shaw and Justin Masterton are other options for the ninth-inning role. The manager said Perez poked his head in the office and apologized for his performance.

``We'll see. He felt bad. He was actually very team-oriented. That's what you're looking for,'' Francona said. ``He's having a tough time, and he's owning up to it, and he doesn't want to cost us wins.''

Francona added: ``We're not a team made of one person. We'll figure it out.''

Perez has a 7.52 ERA in August and September, with 30 hits and seven homers allowed in 20 1-3 innings.

``Anytime your closer is struggling a little bit, it's tough,'' McAllister said. ``He's a great pitcher. He's been great for his whole career. You don't become All-Stars for no reason. He knows how to pitch, and he'll be ready.''

McAllister had a shutout intact despite allowing runners on in every inning. After a walk and a single with one out in the fifth, Shaw was summoned and got Ryan Doumit on a double-play grounder.

McAllister gave up six hits and two walks. This was the right-hander's shortest start in September, and the 68 pitches were his second-lowest total of 24 starts this season.

``You definitely want to have that chance to get the win out there and stay in the game as long as you can, but it's September now,'' McAllister said. ``We have a lot of guys in the bullpen, and every game's an important one. So you can't question anything.''

Shaw is 5-0 in 13 appearances this month, and hasn't permitted a run in 15 1-3 innings. Francona said he wanted to leave McAllister in but couldn't.

``I just thought it was time. If I'd have been managing with my heart, I would've left him in,'' Francona said.

The Indians caught quite a break with their September schedule, facing the teams with the three worst records in the league in 14 of their final 17 games: the Twins, White Sox and Astros. The Twins have won a mere four of their last 21 home games since mid-August. They've lost 17 of 22 overall.

The Twins had to watch their opponents celebrate division-clinching wins in each of the last two series, in Oakland and then Detroit here in their own ballpark. They'll have to win a couple of games this weekend to prevent another party at Target Field.

``Like the way they finished and got after it,'' Twins manager Ron Gardenhire said. ``Just needed one more hit.''

NOTES: The Indians will start RHP Corey Kluber (10-5, 3.61 ERA) on Friday night against LHP Pedro Hernandez (3-2, 6.05 ERA). Kluber has won a career-best four straight decisions. ... The Indians kept CF Michael Bourn out again with a sprained right wrist. He was available to run but not hit.