Updated

In a postseason full of twists and turns, the San Francisco Giants are headed back to the World Series after a remarkable comeback against the defending champs.

Hunter Pence got the Giants going with a weird double, Matt Cain pitched his second clincher of October and San Francisco closed out Game 7 of the NL championship series in a driving rainstorm, routing the St. Louis Cardinals 9-0 on Monday night.

San Francisco won its record-tying sixth elimination game of the postseason, completing a lopsided rally from a 3-1 deficit.

"We're going to the World Series, this is unbelievable," series MVP Marco Scutaro said.

The Giants, who won it all in 2010, will host reigning AL MVP and Cy Young winner Justin Verlander, Triple Crown slugger Miguel Cabrera and the Detroit Tigers in Game 1 on Wednesday night.

Verlander is set to pitch Wednesday's opener at AT&T Park. Gianst manager Bruce Bochy insisted before Monday's game he had not planned any further in advance.

Scutaro produced his sixth multihit game of the series and matched an LCS record with 14 hits and Pablo Sandoval drove in a run for his fifth straight game.

"These guys never quit," Bochy said. "They just kept believing and they got it done."

After falling behind 3-1 in the series at Busch Stadium, the Giants outscored the wild-card Cardinals 20-1 over the final three games behind stellar starting pitching from Barry Zito, Ryan Vogelsong and Cain.

They also benefited from some strange bounces.

On Pence's double that highlighted a five-run third, his bat broke at the label on impact, then the broken barrel hit the ball twice more. That put a rolling, slicing spin on the ball and caused it to change directions -- leaving shortstop Pete Kozma little chance to make the play. Kozma broke to his right, figuring that's where the ball would go, but it instead curved to left-center.

Injured closer Brian Wilson, with that out-of-control bushy black beard, danced in the dugout and fans in the sellout crowd of 43,056 kept twirling their orange rally towels even through rain in the late innings -- a downright downpour when Sergio Romo retired Matt Holliday on a popup to Scutaro to end it.

"This rain never felt so good," Scutaro said.

Romo embraced catcher Buster Posey as fireworks went off over McCovey Cove beyond right field.

The NL West champion Giants won their first postseason clincher at home since the 2002 NLCS, also against the Cardinals.

These 2012 Giants have a couple of pretty talented castoffs of their own not so different from that winning combination of 2010 "castoffs and misfits" as Bochy referred to his bunch -- with Scutaro right there at the top of the list this time around.

Acquired July 27 from the division rival Colorado Rockies, Scutaro hit .500 (14 for 28) with four RBIs in the NLCS. The 36-year-old journeyman infielder, playing in his second postseason and first since 2006 with Oakland, became the first player in major league history with six multihit games in an LCS.

Now, he's headed to his first World Series.

The Giants have All-Star game MVP Melky Cabrera to thank for helping his teammates secure home-field advantage in the postseason -- while Cain was the winning pitcher the National League's 8-0 victory in July. Cabrera was suspended 50 games Aug. 15 for a positive testosterone test, then wasn't added to the roster by the Giants after his suspension ended.

After rain fell on the Cardinals during batting practice, the skies turned blue and the weather cooperated. Anxious players on both sides hung over the dugout rails as the game began.

Cain joined St. Louis' Chris Carpenter as the only pitchers with victories in two winner-take-all games in the same postseason. Carpenter, who lost Games 2 and 6 in this series, did it last year.

Cain also pitched the Giants' Game 5 division series clincher at Cincinnati, when San Francisco became the first team in major league history to come back from an 0-2 deficit in a five-game series by winning three consecutive road games.

"I think to do it, the guys actually have to believe it can happen," Posey said.

He delivered on an even bigger stage Monday as San Francisco saved its season once again. The Giants won their 20th NL pennant and reached their 19th World Series.

Cain walked off the mound to a standing ovation when Jeremy Affeldt entered with two outs in the sixth. Affeldt then got Daniel Descalso to pop out with two runners on.

Yadier Molina had four hits but got little help from the rest of the Cardinals, who went 1 for 21 with runners in scoring position over their final three games.

"It's about the team that's hot, and we went on a cold streak," Cardinals manager Mike Matheny said. "We got to this point by being that team that was hot and taking advantage of opportunities. But we just couldn't make it happen these last two games."

Cain added an RBI single to his cause and got some sparkling defense behind him.

The play of the game went to shortstop Brandon Crawford, who made a leaping catch of Kyle Lohse's liner to end the second inning with runners on second and third that would have been a run-scoring hit.

In the third, Scutaro, the second baseman, made a tough stop on a short hop by Carlos Beltran, and left fielder Gregor Blanco ran down a hard-hit ball by Allen Craig in left-center to end the inning.

Cain's second-inning single made San Francisco the first team in major league postseason history to have a starting pitcher drive in a run in three straight games.

Brandon Belt hit a solo homer in the eighth for his first clout of the postseason.

It took production from everybody, even the pitchers, for these scrappy Giants to rally back from the brink one more time.

Cain certainly did his part to keep the staff rolling.

The 16-game winner, who didn't surrender an earned run during his team's title run two years ago, reached 46 pitches through two innings but settled in nicely the rest of the way to avenge a loss to Lohse in Game 3.

Cain even got to repay Holliday for his hard slide into Scutaro at second base in Game 2 here a week earlier. Cain plunked Holliday in the upper left arm leading off the sixth, drawing cheers from the crowd.

The right-hander escaped trouble in the second with runners on second and third when Crawford made his catch.

Holliday returned to the lineup after missing Game 6 a night earlier with tightness in his lower back. He received loud boos when he stepped in to hit in the first from a fan base still angry about his slide that injured Scutaro's hip.

Beltran is still left 0-fer the World Series, winless in three Game 7s during his 15-year career. And to think just last fall he was on the other side with the Giants as they missed the playoffs a year after winning the club's first World Series since moving West in 1958.

The Cardinals went an NL-best 12-4 from Sept. 16 to the end of the season to earn the NL's second wild card on the second-to-last day of the season, then won 6-3 in a winner-take-all playoff at Atlanta to reach the division series. The Cardinals then rallied from a 6-0 deficit with a four-run ninth inning to stun the Washington Nationals 9-7 in Game 5.

Scutaro joined Hideki Matsui (2004 Yankees), Albert Pujols (2004 Cardinals) and Kevin Youkilis (2007 Red Sox) with 14 hits in a league championship series.

Sandoval's run-scoring groundout in the first that put his team ahead gave him at least one RBI in five straight postseason games, matching home run king Barry Bonds' franchise record set in 2002.