SAN FRANCISCO - Travis Ishikawa's teammates didn't bother waiting. His walk-off homer had just cleared the rightfield fence, lifting the Giants to a dramatic 6-3 victory Thursday night, and a triumph over the Cardinals in the National League Championship Series.

But before he could touch third base, he was greeted by a teammate. And then another. And then another. The journeyman spiked his helmet and completed his victory romp at home plate.

With that, the Giants won the pennant and will play for their third world championship in the last five seasons. They will face the upstart Royals, in search of their first title since 1985.

Michael Morse turned up the drama in the eighth inning of Game 5, when he made it 3-3 with one swing. The slugging outfielder has barely played since the beginning of September, hobbled by an oblique injury. Still hurt, he was left off the roster for the wild-card game and the Division Series against the Nationals.

He made the NLCS roster as a pinch-hitting option for Bruce Bochy, who hoped for a shot in the arm when he tapped Morse in the eighth.

Cardinals reliever Pat Neshek delivered a pitch for Morse to drive, and the ball sailed over the fence in leftfield. A wide-eyed Morse circled the bases and descended into the dugout, where he was mobbed.

The Cardinals loaded the bases in the ninth against closer Santiago Casilla, but they came away with nothing. With two outs, Mike Matheny sent up rookie Oscar Taveras to pinch hit.Bochy countered by turning the game over to lefty Jeremy Affeldt. Taveras hit a weak grounder toward the first-base line that the pitcher fielded before running to the bag. The Giants held the line.

The Cardinals started the ninth with Michael Wacha, whose right shoulder had been wrecked by a shoulder injury. He hadn't pitched since Sept. 26. But with their season on the line, Matheny went to Wacha.

Pablo Sandoval singled and with one out, Brandon Belt walked on four pitches. Ishikawa took two pitches out of the strike zone, and then made history.

The Cardinals were dispatched despite a strong effort by Adam Wainwright. After entering his start with question marks about the health of his elbow, Wainwright held the Giants to two runs in seven innings.

For much of the postseason, the Giants have stashed away a first baseman in leftfield. But in the third, when the Cardinals took a 1-0 lead, there was no hiding Ishikawa's inexperience.

Madison Bumgarner had already walked a pair when Jon Jay sliced a liner to left. Ishikawa charged, reversed course, then leaped to no avail. The ball sailed over his glove and the Cards capitalized to go up 1-0.

The Giants answered with a rare burst of power in the third, when Joe Panik bashed a two-run homer that hugged the rightfield line. He was the first Giants hitter to leave the ballpark since Brandon Belt hit his 18th-inning solo shot in Game 2 of the Division Series.

In response, the Cardinals doubled down in the fourth. They pushed ahead 3-2 on solo shots by Matt Adams and Tony Cruz, the replacement for hobbled catcher Yadier Molina.

With the lead, Wainwright went into cruise control, baffling the Giants with a razor-sharp curveball. He varied his delivery, adding little wrinkles, anything to throw off the Giants. All of it seemed to work.But it wasn't enough. Not when Morse made it a whole new game. Not when Ishikawa ended it with a slice of sweet redemption.