SAN FRANCISCO (AP) — Travis Ishikawa was a man without a team six months ago. Today, he's the San Francisco Giants' latest postseason hero.

Ishikawa sent the Giants to the World Series by launching a three-run, walkoff homer in the bottom of the ninth to complete a 6-3 victory over the St. Louis Cardinals in Game 5 of the NLCS. Pablo Sandoval opened the rally with a leadoff and went to second on a walk by Brandon Belt before Ishikawa sealed San Francisco's third National League pennant in five years. The blast came off Michael Wacha, who was making his first appearance of this postseason and had worked just 16 2/3 innings since June 17 because of a shoulder injury. Wacha was the MVP of last year's NLCS.

Ishikawa opened the season with the Pirates but became a free agent in April after refusing a minor league assignment. He signed a deal with the Giants April 25, bringing him back to his original team.

Ishikawa finished the series hitting .385 with an NLCS-leading seven RBIs.

The Giants did all of their scoring via the longball. Joe Panik gave the Giants a brief 2-1 lead with a two-run shot off Adam Wainwright in the third inning. It was the only major mistake by Wainwright, who left with a 3-2 lead after scattering four hits in seven innings.

The Cardinals regained the lead on solo homers by Matt Adams and Tony Cruz in the fourth inning, and the lead held up until pinch-hitter Michael Morse smacked a solo homer off Pat Neshek in the eighth.

Giants starter Madison Bumgarner was named the series MVP after helping the Giants win the first and last games. Bumgarner allowed three runs in eight innings on Thursday, leaving him with a 1.72 ERA for the NLCS.

The Giants now have four days to prepare for Game 1 of the World Series Tuesday in Kansas City. San Francisco will enter the Fall Classic with a 7-2 postseason record, but the Royals are 8-0.