MINNEAPOLIS — Kyle Gibson knew his job was potentially on the line when he faced the Detroit Tigers on Saturday night. He picked a great time to deliver his best start of the season.

Gibson took a shutout into the eighth inning, Zack Granite had three of the Twins’ 14 hits, and Minnesota held off a late rally for a 6-5 victory.

The Twins have been rumored to be searching for starting pitching as the trade deadline approaches and Gibson (6-8), who entered the game with a 6.29 ERA, was a likely candidate to be replaced in the rotation.

“That’s part of the mental grind I’ve been on this year, whether it’s being sent down or when to be called back up,” said Gibson, who was demoted to Triple-A for two weeks in May. “I know that each start I’ve got to go out there and give the team a chance to win.”

He looked like an ace Saturday until tiring after pitching into the eighth for the first time this season, and the Tigers rallied for five runs. Alex Presley’s ground-rule double broke up the shutout and knocked out Gibson. Justin Upton followed with a three-run homer off reliever Taylor Rogers to pull the Tigers to 6-4.

“(Upton’s homer) kind of ignited the dugout after it being relatively quiet through the first seven innings,” Tigers manager Brad Ausmus said. “That swing of the bat immediately, I think, shifted the game for a moment in our favor, and we were able to get back into it.”

The Tigers scored again on a throwing error by Miguel Sano before All-Star closer Brandon Kintzler retired Andrew Romine on a grounder to get out of the inning. Kintzler then pitched a scoreless ninth for his 27th save.

“Big-league save,” Twins manager Paul Molitor said. “That’s a tough one when the momentum’s changed like that and you find a way off the field.”

Gibson got out of a first-inning jam by starting a double play on a comebacker by Alex Avila. Then he cruised through the next six innings, allowing just three baserunners. Gibson sailed through the fourth inning on six pitches, then went one better with a five-pitch fifth inning.

The Twins scored five times from the second to the fourth innings to take control, even while stranding seven runners during that stretch. Joe Mauer and Robbie Grossman drove in runs with back-to-back hits in the second off starter Jordan Zimmerman (6-8), while Sano and Eddie Rosario added to the lead with sacrifice flies.

“I left a few balls over the middle and I had a lot of deep counts,” said Zimmerman, who allowed five runs on nine hits and four walks in just 3 2/3 innings. “First-pitch strikes were good but then it just seemed like ball, ball, ball, and the next thing you know it’s 2-1, 3-1 and I’m battling out there. When I did leave the ball over the middle, it got hit.”

ROSARIO’S ROCKET

Twins left fielder Eddie Rosario made perhaps the play of the game in the top of the ninth inning. Jose Iglesias led off with a sharp single down the left-field line. It looked like a sure double, putting the potential tying run in scoring position with nobody out. But Rosario played the carom perfectly and fired a strike to second in time to nail Iglesias.

“Luckily we’ve got a guy that hustles his butt off to the line and has a great arm,” Kintzler said. “Obviously that’s a game-changer right there.”

UPTON GETS IT DONE ON D

Detroit’s deficit would’ve been much larger if Upton hadn’t come up with two huge defensive plays in left field. First, he threw out Grossman at the plate trying to score from second on Granite’s two-out single in the third. Then with Granite on first and nobody out in the fifth, Upton made a leaping catch at the wall to rob Castro of an extra-base hit.

TRAINER’S ROOM

Tigers: 1B Miguel Cabrera sat out Saturday’s game with a right clavicle contusion. Cabrera was still sore a day after taking a bad-hop grounder off his collarbone. Ausmus said Cabrera is still considered day-to-day.

Twins: LHP Glen Perkins, recovering from a shoulder injury, threw a scoreless inning for the rookie-league GCL Twins in Florida on Saturday. It was the first time Perkins had pitched in a game at any level in 13 months. Molitor said Perkins topped out at 90 mph and struck out two batters in the eight-pitch outing.

UP NEXT

Tigers: LHP Matthew Boyd (3-5, 5.58 ERA) picked up his first victory in two months when he went six innings in a win at Kansas City on Tuesday. Boyd had been called up from Triple-A Toledo to make the start.

Twins: LHP Adalberto Mejia (4-4, 4.22) gave up one run in 5 1/3 innings against the Yankees on Tuesday. The rookie has pitched at least 5 innings in each of his last five starts.