(CNN) -- Fending off elimination for the third straight game, the San Francisco Giants thrashed the St. Louis Cardinals on Monday night to earn the right to battle for their second World Series title in three years.
The Giants beat the Cardinals 9-0 Monday in a game that lacked the drama of some of the other games during the highly competitive series.
San Francisco had been on the brink since last Thursday, when St. Louis jumped to a three games to one advantage in the best-of-seven National League Championship Series. But San Francisco has been on a roll since -- beating the Cardinals twice by five-run margins, before finishing off the reigning champs in convincing fashion Monday at AT&T Park, the northern California team's home.
With the victory, the Giants earned the right to face the Detroit Tigers in the World Series, which begins Wednesday. The Tigers handily swept the New York Yankees last week to become American League titlists and earn their shot at baseball's top prize.
On Monday night, San Francisco used the same formula that's worked for them so well in recent days: timely hitting and exceptional pitching.
Matt Cain was stellar on the mound, pitching 5 and 2/3 scoreless innings to start the game. He even helped his cause at the plate with a run-scoring single in the second inning.
The next frame, the Giants exploded for five runs to build a comfortable 7-0 lead.
They never looked back, fending off a St. Louis rally in the sixth inning and tacking on more runs in the seventh and eighth innings.
Monday's win also marked the second furious comeback the Giants had completed during the postseason.
The team was able to come back from a 2-0 deficit and win a best-of-five series against the Cincinati Reds earlier in the playoffs.
"They didn't want to go home. They kept believing," said Giants manager Bruce Bochy
Giants catcher Buster Posey said it is the team's attitude that helps them beat the odds.
"It is a lot of want and a lot of will power," Posey told reporters. "You have to believe you can do it."
The Giants easily finished the regular season atop the National League West with a 94-68 record, tied with Atlanta for fourth best in the league.
Detroit, meanwhile, had an 88-74 mark in pulling past the Chicago White Sox in the final month to earn a ticket to the playoffs. That said, while their record is inferior, the Tigers feature two of the biggest weapons in baseball in pitcher and 2011 American League MVP Justin Verlander and this year's Triple Crown winner Miguel Cabrera.