CLEVELAND — Josh Tomlin is running out of time, if he hasn’t already.

October is right around the corner, and if he’s going to pitch then — or in any meaningful games down the stretch — Tomlin knows he had better start performing for the Indians.

“I need to figure it out, and figure it out quick,” he said.

Tomlin didn’t get out of the second inning Tuesday night, continuing a run of bad starts for the right-hander, but Cleveland rallied and got another strong outing from its bullpen to beat Minnesota 5-4 and extend the Twins’ losing streak to 12 games.

Francisco Lindor’s double off Alex Wimmers (0-1) snapped a 4-4 tie and helped the Indians maintain their lead over second-place Detroit in the AL Central.

Rajai Davis hit a three-run homer and Jason Kipnis added a solo shot for Cleveland, which trailed 4-1 in the second after the Twins knocked around Tomlin, who lasted just 1 2/3 innings. Dan Otero (4-1) pitched 2 2/3 hitless innings, Bryan Shaw worked out of a jam in the seventh and Andrew Miller got five outs for his third save since joining Cleveland.

The Indians also got a spectacular play from reliever Zach McAllister, who blindly swung his left leg behind him to stop a comebacker in the sixth inning.

“I don’t know if that caught him or he caught it,” Indians manager Terry Francona said. “I know he’s going to have a bruise on his calf, but he’ll take it.”

It all bailed out Tomlin, who is 0-5 with an 11.47 ERA in his last six starts and could soon find himself out of Cleveland’s rotation. Francona said he may soon juggle things and Tomlin understands he’s the reason why.

“Whatever move he makes I understand,” Tomlin said. “I’m struggling. I know I’m struggling. I take full ownership in that. It’s my fault. I don’t know what I’m doing, but I’m anxious to back here tomorrow and try to figure it out. Whatever he has to do, I get it.”

Minnesota’s current slide is the third longest in club history. The Twins, who have lost five one-run games in the stretch, dropped 13 straight in 1961 and a team-record 14 consecutive games in 1982.

Brian Dozier homered for the Twins, winless since Aug. 17. Minnesota pitchers walked eight.

“Too many walks,” Dozier said. “You can’t give stuff away, especially against a good team. This is the big leagues. You can’t give away stuff like that.”

As the playoff race heats up, the Indians found some outfield depth, agreeing on a trade to acquire Coco Crisp from Oakland. A person familiar with the deal told The Associated Press the sides are only awaiting approval from Major League Baseball. The 36-year-old Crisp began his career with Cleveland in 2002.

With runners at first and second in the fifth, Lindor barely missed hitting a three-run homer when his shot caromed high off the wall in left-center. Davis scored easily from second, but Kipnis was thrown out at the plate by shortstop Eduardo Escobar, who made a perfect relay.

The Indians had two runners thrown out at third and one at home.

Tomlin was in trouble on his first pitch, with Dozier driving it into the seats for his 31st homer. The Twins made it 2-0 on Miguel Sano’s RBI single.

MCALLISTER’S MAGIC

In the sixth, Minnesota’s Kurt Suzuki hit a smash through the middle behind McAllister, who whipped his leg around to stop the ball. It popped straight up and the right-hander snagged it for the out.

“Just reaction,” said McAllister, whose calf was red and swollen. “There’s nothing more than that. It’s a ball coming back at you and hopefully you either stop it and make the play, or it goes through the middle and it’s probably a base hit. It just worked in my favor tonight.”

TRAINER’S ROOM

Indians: OF Michael Brantley expects to wear a sling for six more weeks as he recovers from his second surgery since November. The former All-Star only played 11 games this season and endured numerous setbacks as he tried to come back from offseason right shoulder surgery. He had an operation on his biceps earlier this month.

UP NEXT

Twins: Pat Dean makes his second start since being recalled Aug. 12. The right-hander lasted just three innings in his previous start, allowing six runs and eight hits in a loss to Toronto.

Indians: Making a run at his second AL Cy Young Award in three seasons, Corey Kluber (14-8) starts the series finale. He hasn’t lost since July 3, going 6-0 in his last nine starts. Kluber led the AL with 16 losses last season.