As the Twins waited out a thunderstorm that interrupted their Saturday game against the Giants ahead of the eighth inning, they spent their time manifesting.

Up to that point, they hadn't been playing very well, despite keeping San Francisco to just one hit. The offense, which scored nine runs in Friday's game, appeared to have fall back into bad habits when it came to clutch hitting.

But on TV in the clubhouse during that half-hour or so was the Braves-Cardinals game. The Twins watched as the Cardinals, down 5-4 heading into the bottom of the ninth, loaded the bases and proceeded to tie and then win the game. On a walk, of all things.

"I think we got inspired," Carlos Correa said. "… [We] said, 'Let's do the same thing.' We went out there and did it the exact same way, walkoff walk."

There was slightly more intrigue in the Twins 3-2 result, though. Correa and Jake Cave combined with RBI singles in the bottom of the ninth to tie the game before the free runner at second, a walk and an intentional walk loaded the bases in the bottom of the 10th. Gilberto Celestino then coolly drew a four-pitch walk from Giants reliever Dominic Leone to force in the winning run.

For whatever fraction of the announced crowd of 27,570 stuck around through the rain, they saw a better Twins team emerge from the layoff than the one that entered it. The Twins outhit San Francisco 9-4 but still were just 2-for-10 with runners in scoring position, stranding 14 on base.

But the fact that they somehow managed the win despite that said something to Twins manger Rocco Baldelli. In the 9-0 victory Friday that snapped a six-game losing streak, the Twins pitching, hitting and fielding was vibing. That was not the case Saturday.

Twins starter Sonny Gray allowed only one hit and one run in five innings but walked four, while reliever Trevor Megill doubled the Giants' lead in the top of the ninth, giving up three hits through his two innings.

In the field, Celestino made a gaffe in the ninth at center field, catching what ended up being a sacrifice fly but not throwing the ball back into play with any urgency, perhaps because he didn't realize there was only one out. That allowed the runner at first to scamper to second.

In the bottom of the ninth, Luis Arraez almost ended the inning on Correa's hit. The Twins tried to hold Max Kepler at third, but Arraez was already on his way there, which forced Kepler home and Arraez to scramble to third. It worked out, but it was certainly dicey.

"It's kind of a sweet feeling in our game when you find different ways to win," Baldelli said. [Friday] we come out swinging the bats great, pitch great, play good defense. It was really an all-around game. [Saturday's] game did not come so easy. It was a challenging affair in a lot of ways — offensively, pitching-wise at times and defensively. Honestly, we didn't play perfect baseball. But we did enough, and we certainly didn't quit."

The Twins improved to 64-61, three games back from Cleveland in the American League Central lead and now two games clear of the White Sox in third. The Giants fell to 61-64, far back in third in the National League West.

"It very easily could have turned the other way from us," Gray said. "The rain delay happened. We sit in and come out firing right after it. It was a big win. It was a big win. We used pretty much every guy on the roster.

"You don't get more of a better team win than that."

Polanco exits early

Second baseman Jorge Polanco left the game ahead of the seventh inning Saturday with left patellar tendinitis, and Baldelli doesn't expect him to play in the series finale against the Giants on Sunday.

Polanco has been dealing with his sore knee that his kept him out of a few games since he hurt it sliding into home plate two weeks ago.

"Swinging is one thing that actually is bothering it right now as much as anything," Baldelli said. "Not really what you'd probably think from that type of tendinitis issue, but that's when he feels it. He's actually running OK, but there's certain movements that are affecting him. So we'll check in with him [Sunday]. He'll be here, probably early, in the training room."