There was a chance that Phil Hughes wasn’t going to start the rest of the season. He wasn’t sharp in his first two appearances after recovering from a sore back. And with the Twins in win-now mode, he could have been idling in the back of the bullpen.

But Tommy Milone’s shoulder started showing signs of fatigue, so Hughes got the ball one more time.

He came through for the Twins on Wednesday night at Target Field.

Hughes pitched five shutout innings while his teammates finally figured out righthander Corey Kluber in a 4-2 victory over the Cleveland Indians. The Twins have won three consecutive games to creep within one game of Houston for the second AL wild-card playoff spot. The Astros blew a late lead Wednesday and lost 6-5 to the Angels. But the Twins need that door to crack open a little more, and will go for a sweep of the Indians on Thursday before leaving on a seven-game road trip.

Hughes was making his third appearance and second start since missing more than five weeks. He held the Indians to four hits while striking out four. His breaking ball was noticeably sharper, and he was ahead in the count more than his past two appearances.

“I told him it was the five biggest zeros he’s had all year,” Twins manager Paul Molitor said. “He gave us a chance to win.”

Hughes got out of the second and fourth innings by inducing ground-ball double plays, and the hardest hit ball off him was Yan Gomes’ double to the left-center fence in the fifth. Hughes threw 66 pitches, one more than in his Sept. 15 start. And he pretty much cemented his spot in the rotation, at least for the time being.

“This is the time of year where every good performance is magnified,” said Hughes, who improved to 11-9 with a 4.43 ERA. “It was nice to get this one, and hopefully puts me in a spot where I can help this team down the stretch.”

The Twins didn’t have to worry about Hughes after all. Their main worries Wednesday were Kluber, the defending AL Cy Young Award winner, and rain.

They crossed their fingers that Wednesday’s game could be played so they could avoid a doubleheader Thursday, when more rain was in the forecast.

And Kluber entered the game 2-0 with a 1.38 ERA in three starts against the Twins this season. He had Cy Young-level stuff during the first time through the order, holding the Twins to one hit. But he began to miss spots the second time through the lineup.

Brian Dozier got hold of an up-and-away pitch and hit it over the right-field wall for his first home run since Sept. 6. It also was the only one of his 75 career home runs to be hit to right field. The Twins added three more runs in the inning, one on Trevor Plouffe’s RBI double and two on a two-out single by Eduardo Escobar.

Escobar’s single proved to be big, because Carlos Santana blasted a two-run homer off Glen Perkins in the ninth. Perkins got Gomes to fly out to end the game, but turned and yelled at home plate umpire Dan Bellino for his strike zone judgment earlier in the inning. Perkins was ejected.

That was one of the few things to go wrong on a night in which the Twins gained ground in the wild-card race.

“We picked up a couple games in a couple days, and we are back to even in the loss column,” Molitor said. “We’re back into having a chance.’’