SAN FRANCISCO -- Rallying from the brink of elimination in consecutive playoffs series, San Francisco celebrated a second National League pennant in three seasons with a 9-0 triumph over the St. Louis Cardinals in Game 7 of the NLCS on Monday night.
The Giants rallied from a three-games-to-one deficit to eliminate the Cardinals, and had won three straight to oust the Reds after falling behind 0-2 in that best-of-five series.
The Giants will meet American League champion Detroit in the 108th World Series set to start on Wednesday when Tigers' ace Justin Verlander will likely oppose Barry Zito for the host Giants in Game 1.
World Series champs in 2010, the Giants will have home-field for the best-of-seven Fall Classic as the franchise qualifies for the World Series for the 19th time overall and the fifth time since moving to San Francisco from New York in 1958.
The Cardinals, winners of last year's World Series, ran out of comebacks. They lost in an elimination game for the first time in seven tries extending back to 2011.
Sergio Romo got Matt Holliday to pop out for the final out of the game, which ended with rain pouring down at soaked AT&T Park.
The Giants scored all but two of their runs in the first three innings, highlighted by a five-run third when they chased St. Louis starter Kyle Lohse and took advantage of subpar defense.
Meanwhile, Matt Cain wasn't dominating, but he was good enough to keep the visitors off of the scoreboard for his 5 1/3 innings (five hits, one walk and four strikeouts in 102 pitches). Jeremy Affeldt, Santiago Casilla, Javier Lopez and Romo followed to combine on the seven-hit shutout.
St. Louis, which stranded 10 runners in Game 7, scored only one run over the final 28 innings of the NLCS. Casilla stranded runners on second and third with one out in the eighth by getting David Freese on a comebacker and striking out pinch-hitter Tony Cruz.
San Francisco tacked on insurance in the seventh when Gregor Blanco scored on a double-play ground ball, and Brandon Belt hit a solo homer with two outs in the eighth.
San Francisco broke it open in the third, scoring five times after having tallied once in each of its first two at-bats for a 7-0 lead.
The Giants sent 11 batters to the plate in the third. Hunter Pence greeted Cardinals' reliever Joe Kelly with a sharp single to center with the bases loaded. That scored three runs to make it 5-0 as Buster Posey raced around from first when Jon Jay bobbled the ball in center.
Posey had reached base on a walk that chased Lohse after Kohse had allowed a Marco Scutaro single and a Pablo Sandoval double to start the inning.
With Pence on second, Belt got an infield single, a drive deflected by Kelly to second base. Following a full-count walk to Blanco, Brandon Crawford hit a roller to short that Pete Kozma relayed late to catcher Yadier Molina in an attempt to force Pence. That made it 6-0, and Belt scored the fifth run of the inning when the Cardinals were unable to double up Angel Pagan on a grounder to short.
The Giants scored single runs in each of the first two innings to jump out 2-0.
Pagan led off the San Francisco first with a single to right. Scutaro extended his postseason hitting streak to 10 straight with a hit-and-run single to right, chasing Pagan to third.
Sandoval was fooled on a 1-0 curveball, but managed a dribbler to the right of Lohse. The Cardinals' starter could do nothing more than throw to first with Pagan diving across home plate from third.
Cain helped himself in the second by hitting a 1-1 slider just out of the reach of Lohse and into center field for a two-out single to score Blanco from second base. Blanco had reached on a one-out single and moved into scoring position on Crawford's fielder's choice grounder to first.
St. Louis made Cain throw 58 pitches to work out of jams in each of the first three innings.
Carlos Beltran singled with one out in the first, but was stranded at second following a stolen base as Matt Holliday flew out to center and Allen Craig popped weakly to third.
Cain surrendered a hit and a walk to start the second, but retired Daniel Descalso on a fielder's choice, struck out Kozma on a full-count pitch and watched as Crawford took two steps back to make a leaping catch of Lohse's soft liner.
Blanco made a fine running catch toward center on Craig's bid for extra bases to strand Jay, who led off the third with a single to left. Holliday flew out to deep right for the second out of the inning.
Staked to a seven-run lead, Cain was more aggressive in the strike zone and faced only seven hitters between the fourth and fifth innings. He retired six straight after surrendering Molina's second single in as many at-bats to lead off the fourth.
NOTES: Holliday was back in the St. Louis lineup -- hitting third and playing left field -- after getting scratched late from Sunday's Game 6 due to lower back stiffness. ... The Giants played their first deciding game of a postseason series at home since Oct. 16, 1962, when the New York Yankees beat San Francisco 1-0 in Game 7 of the World Series. ... San Francisco had lost all three Game 7s in its history since moving West from New York, falling to the Angels in the 2002 World Series, the Cardinals in the 1987 NLCS in addition to the '62 loss to the Yankees. ... The Cardinals had captured their last three Game 7s since losing to Atlanta in the 1996 NLCS.