San Francisco and St. Louis first met in the NLCS in 1987, and the result was a thrilling seven-game classic full of compelling moments. The same two teams met again in the NLCS in 2002, right in the prime of Barry Bonds' run of four consecutive Most Valuable Player trophies.
The Cardinals, who had won the World Series in 1982 and lost it in '85, came into the '87 season with a lineup fueled by the small ball stylings of Ozzie Smith, Tommy Herr and company. The Giants, by contrast, hit a club record 205 home runs and had five players with at least 18 homers.
One of those players -- veteran outfielder Jeff Leonard -- would go on to leave a historical footnote. Leonard homered in each of the first four games of the NLCS for San Francisco, and he became just the third player to be named Most Valuable Player for the losing team in a postseason series.
The Giants led twice in the first game of the series, but the Cardinals came back to snag a 5-3 win at home. Leonard and Will Clark both homered in Game 2, though, and San Francisco starter Dave Dravecky evened the scales by pitching a complete game two-hitter in a 5-0 victory.
The Giants roared out to a four-run lead back at home in Game 3, but the Cardinals chipped away in the sixth inning and swung the game in their favor with a four-run rally in the seventh. St. Louis won Game 3 by a 6-5 final score, hanging on despite a Harry Spilman homer in the ninth.
San Francisco won Game 4 behind a strong outing from Mike Krukow, who overcame two early runs and went on to pitch a complete game. The Giants took advantage of their home field again in Game 5, using a stellar five-inning relief performance from Joe Price en route to a 6-3 win.
And that's where everything turned. The Cardinals returned home trailing 3-2 and had to face Dravecky, who had so thoroughly dominated Game 2. Dravecky was strong again, but John Tudor pitched six shutout innings and the Cardinals used a sacrifice fly to take a 1-0 victory.
Game 7, by contrast, offered closure if not great drama. Danny Cox pitched a complete game for the Cardinals, who romped to a 6-0 win paced by a three-run homer by utilityman Jose Oquendo. St. Louis, in turn, would go on to lose a memorable seven-game World Series to the Twins.
Fifteen years later, the same two teams met on the doorstep of the World Series. Bonds, force of nature, had batted .370 with 198 walks and an incredible .582 on-base percentage during the season and would collect his second consecutive MVP award after the playoffs were over.
The Cardinals, fueled by young Albert Pujols and veteran Jim Edmonds, featured future manager Mike Matheny behind the plate and 17-game winner Matt Morris on the mound. St. Louis had won 97 games en route to the Central division title and had bumped off defending champion Arizona in the NLDS.
Game 1 of the NLCS started with a bang, as both teams drilled three homers apiece in an offensive slugfest. San Francisco rolled to a five-run lead, and St. Louis would never really get close the rest of the way. The Giants earned a 9-6 win on the road over Morris and the Cardinals.
Bonds went quietly in Game 2, but shortstop Rich Aurilia got the Giants going with a pair of home runs. Starter Jason Schmidt made that timely power surge stand up with seven strong innings, and the Giants were able to take a 4-1 lead and a 2-0 edge in the series back home with them.
The Cardinals fought back in the third game of the series, using three home runs -- from Matheny, Edmonds and Eli Marrero -- to assume control of the game. Bonds hit a three-run homer for the Giants, but the Cardinals got four scoreless innings from their bullpen to earn a 5-4 win.
Benito Santiago -- who had debuted and won the Rookie of the Year in the 1987 season -- played a major role in turning the series. San Francisco's catcher came up in a tie game in the eighth inning of Game 4 and blasted a two-run homer to help lift the Giants to a 4-3 victory over St. Louis.
Closer Robb Nen worked the ninth in that game for the Giants, and he saw a rally start with a strikeout and a wild pitch. Edmonds delivered a run-scoring single in the ninth inning and he pushed the potential tying run to third base, but Nen struck out Pujols and J.D. Drew to end the game.
Morris and Kirk Rueter traded zeros in Game 5, and the winning run didn't score until there were two outs in the ninth inning. Veteran Kenny Lofton came up with two outs and two men on base in the ninth, and he singled off Steve Kline to give the Giants a 2-1 win and a series victory.
The Giants, seeking their first World Series victory in San Francisco, would fall short in a seven-game classic to the Angels. Both the Cardinals and Giants have had glory since then -- with St. Louis winning World Series titles in 2006 and 2011 and the Giants in 2010 -- but they know that their next shot at a trophy will come at the other's expense. History, in this case, has a precedent.
Spencer Fordin is a reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.