Tampa Bay lefthander Blake Snell is considered one of the biggest omissions from the AL All-Star team.

And Thursday night, he was snubbed by the Kyle Gibson-led Twins.

The Twins took advantage of an erratic Snell to run up his pitch count before running him from the game after just three innings, his shortest outing of the season.

Meanwhile, Gibson finished his pre-All Star break in style, pitching eight innings for the first time in 51 starts. Eddie Rosario — who could argue that he deserves a spot in the Midsummer Classic — belted a two-run homer. And the Twins survived an anxious ninth inning for a 5-1 victory in a game that ended at midnight following a two-hour rain delay.

Gibson relied on his fastball early before mixing in his sider and curveball later. It enabled him to avoid trouble for the most part and slide into the eighth inning working on a four-hit shutout.

Adeiny Hechevarria led off the eighth with a double and eventually scored on a sacrifice fly to end the shutout bid, but Gibson went eight innings for the first time since he threw eight innings in a victory over Detroit on Sept. 13, 2016.

The Twins still had to survive the ninth, when Ryan Pressly put the first two batters on and loaded the bases with one out. Fernando Rodney was summoned and retired the final two batters, the first on a line drive comebacker from Joey Wendle that the 41-year-old was able to knock down and record a forceout at plate. Rodney then struck out Matt Duffy for his 21st save of the season.

Gibson gave up one run on five hits while striking nine to improve to 4-6, winning back-to-back starts for the first time this season. He was a mess a year ago, serving two stints in the minors. This season, he enters the All-Star break with a 3.42 ERA.

"Hopefully he pitches as well in the second half and gets a lot more wins to show for it," Twins manager Paul Molitor said. "What's he at, four now? We just keep putting him out there."

The Twins continued their successful homestand, with their seventh victory in eight games, by winning the rain-delayed opener of their final series before the All-Star break.

Gibson went out to center field to get loose a little after 7 p.m. in anticipation of a 7:50 start, but then headed for the clubhouse as more storms pushed back that first pitch.

"I probably just had to add to the caffeine and keep the body loose," Gibson said. "I was borderline getting back in the hot tub at 8:20 or so because we hadn't heard anything."

It's not clear what Snell, who entered the game 12-4 with a 2.09 ERA, did during the delay. But he came out misfiring from the start, and the Twins were happy to see that — and work on his pitch count.

Snell threw 30 pitches in the first inning alone. The Twins had the bases loaded with one out, but Jorge Polanco struck out and Willians Astudillo grounded back to the pitcher to end the inning.

Max Kepler drew a leadoff walk in the second, Snell's third walk at that point, and eventually scored during a double play grounder to give the Twins the lead. Snell threw 50 pitches over the first two innings.

Brian Dozier reached on a one-out single in the third and advanced to second on a wild pitch. With the count 2-2, Dozier took off of third, trying to take advantage of Snell's long stride out of the stretch. Robbie Grossman, protecting the plate, swung at a pitch above the strike zone and queued a grounder down the right field line, just past C.J. Cron at first base for a double. Dozier scored to make it 2-0.

"Was able to sneak it through the shift," Grossman said.

Polanco lined the next pitch into the left field corner for another run-scoring double, giving the Twins a 3-0 lead. And just like that — after three innings and 75 pitches — Snell was gone. He had pitched at least seven innings in each of his four previous starts, giving up a total of two earned runs.

"That's how you beat good pitchers," Grossman said. "That guy should never get hit with the stuff he has. He's right up there with Chris Sale with his stuff and you have to make him throw a lot of pitches and get him out as soon as you can and see someone else."

That someone else was former Twins farmhand Chih-Wei Hu, who pitched very well, going the final five innings for the Rays. He didn't give up a hit until the seventh inning, his fourth inning of work, when Joe Mauer blooped a single just inside the left field line. Rosario followed with his 19th home run, giving the Twins a five-run lead.

"We've just been coming out here and it has been nice to put together a little bit of a nice homestand to this point," Molitor said after the Twins got back to seven games below .500 for the first time since June 28. "We're playing a good team here and we know that. We've got to try to finish it as strong as we can. Guys deserve the break. Hopefully we stay present here for the next three days."