SAN FRANCISCO -- If Tim Lincecum wants to win without an overpowering fastball, he knows he will have to find his way through games when he is nowhere near his best.
And he was nowhere near his best Friday night. And yet, he still won.
"He was bobbing and weaving out there the whole game," Giants manager Bruce Bochy said.
Lincecum (4-3) struck out four and walked six in six innings. He allowed five hits and also had two wild pitches, escaping trouble in nearly every inning.
Only 57 of Lincecum's 112 pitches were strikes.
"You've got to battle when you don't have your best stuff, your best command. And today was just that," Lincecum said. "It's kind of an ugly win, but I'll take it.
Sandoval hit a three-run shot in the first, Hicks hit his eighth homer off Kyle Gibson (4-4) in the fourth and drove in another run on a flyout in the seventh.
Gibson gave up five runs and five hits in five innings, working quickly and in command for most of his 72-pitch outing. He struck out four and walked none.
"I really got beat on three pitches, which is the frustrating part," Gibson said.
San Francisco opened its six-game homestand with some pop at the plate and slick maneuvering on the mound.
Hunter Pence extended his hitting streak to 10 games with an infield single after Angel Pagan doubled leading off the first. Pence was originally ruled out, Bochy challenged the call and umpires overturned it after a 33-second video review.
Pagan was thrown out at home on Buster Posey's grounder, but not before third baseman Trevor Plouffe's throw pulled Brian Dozier off second on what would've been an inning-ending double play. Then, Sandoval sent the first pitch he saw over the brick wall in right to put the Giants ahead 3-0. It was Sandoval's fifth home run this season.
"I just focused and tried to calm myself down a little bit more," Sandoval said.
Mauer hit an RBI triple and Parmelee drove in another run for Minnesota in the third to slice San Francisco's lead to 3-2. In the bottom of the inning, Pagan tripled and scored for San Francisco after shortstop Eduardo Escobar couldn't corral Pence's grounder.
Despite his lack of command, Lincecum kept the Giants in control.
The two-time NL Cy Young Award winner, still searching for consistency as his fastball has faded in recent years, walked two and threw two wild pitches in the third without allowing a run. Sandoval fielded Gibson's grounder at third and threw out Escobar at the plate before Lincecum struck out Dozier to end the inning.
In the fifth, Lincecum loaded the bases before getting Escobar to hit a weak groundout to first. Lincecum's saved his smoothest inning for his final one, retiring the side in order before leaving to a standing ovation from the announced sellout crowd of 41,514.
Left-hander Jeremy Affeldt tossed a scoreless seventh for the Giants. After Javier Lopez allowed two baserunners in the eighth, Jean Machi got pinch-hitter Josmil Pinto to ground into a double-play before pitching a perfect ninth for the save.
"We were a little sloppy defensively and we missed plenty of opportunities to get some hits," Twins manager Ron Gardenhire said. "A rough start for us here, and that team over there knows how to take advantage of you."
The Giants will wait until at least Saturday to decide if RHP Matt Cain, who strained his right hamstring Wednesday at Colorado, will make his next start Monday against the Chicago Cubs. Bochy said Cain "was bouncing around pretty good" in the clubhouse. ... Mauer and Posey, who have each won an MVP at catcher, both started at first base. ... Twins RHP Samuel Deduno (1-2, 3.53 ERA), originally slated to start Sunday, will take the mound on Saturday. Ricky Nolasco will pitch Sunday. ... Ryan Vogelsong (2-2, 3.62) goes for the Giants on Saturday and lefty Madison Bumgarner starts Sunday.
St. Louis Cardinals plan to hire bench coach Oliver Marmol, 35, as next manager, sources say
The St. Louis Cardinals, looking for a new direction headed into next season, plan to hire Oliver Marmol, 35, as their next manager, sources told ESPN's Jeff Passan on Sunday night, after the club dismissed Mike Shildt earlier this month.
Sources: San Diego Padres locked in on hiring Indians' Ruben Niebla as pitching coach
The Padres are locked in on hiring Ruben Niebla to be their next pitching coach, sources told ESPN. Niebla has been with the Indians since 2001.
Houston Astros' Framber Valdez gets starting nod for World Series Game 1, will be opposed by Atlanta Braves' Charlie Morton
After tossing a gem at Fenway Park in the ALCS, Houston left-hander Framber Valdez will start Game 1 of the World Series for the Astros on Tuesday, opposed by Atlanta Braves right-hander Charlie Morton.
Braves vs Astros: A World Series 6 decades in the making
— Freddie Freeman swinging onto baseball’s biggest stage for the first time, Jose Altuve & Co. back for more. Luis Garcia, Framber Valdez and a fresh set of Houston arms facing Ozzie Albies, Austin Riley and these eager, young Atlanta bats.
Taylor: I don't thinking about hitting HRs, they happen by accident
Chris Taylor downplays the three home runs he hit in the Dodgers' 11-2 win over the Braves.
Sportsbooks install Houston Astros as World Series favorites over Atlanta Braves
Sportsbooks have installed the Astros as World Series favorites over the Braves. Houston opened as a -150 favorite at Caesars Sportsbook, but the price quickly ticked down to -145, with Atlanta listed at +125.