Updated

Lance Lynn fielded the easy comebacker in the fourth inning and quickly turned to try to start a double play at second base.

Instead, his throw caromed off the bag and set the Giants on a path that would send the National League championship series back to San Francisco.

Lynn was dominant through three innings of Game 5 Friday night, but his throwing error was crucial in a four-run fourth as the Giants beat St. Louis 5-0 and pulled to 3-2 in the best-of-seven series.

"I threw the ball into center field when I could have got myself out of the inning," Lynn said. "It was definitely my fault."

The NLCS now moves back to San Francisco for Game 6 on Sunday. Game 2 starters, St. Louis' Chris Carpenter and the Giants' Ryan Vogelsong are scheduled to pitch.

Defending champion St. Louis is seeking a trip to consecutive World Series for the first time since 1967 and 1968.

The Giants, World Series winners in 2010, have never won a postseason series after falling behind 3-1. But they did win three games in a row — all on the road — to overcome a 2-0 deficit and beat Cincinnati in the NL divisional series. And they've taken back momentum in this series, disappointing a Busch Stadium-record crowd of 47,075 that was ready to celebrate what would be the team's 19th pennant.

Lynn's effort was a near mirror image of Game 1. Staked to a 6-0 lead in that game, he pitched well through three innings then gave up four runs and couldn't get out of the fourth, though the Cardinals held on for a 6-4 win.

This time, he hurt himself with his defense and the Cardinals were stifled by Barry Zito's assortment of mixed-speed pitches.

Lynn did not give up a hit until Marco Scutaro and Pablo Sandoval each singled to start the fourth. Buster Posey struck out, then Hunter Pence hit a high chopper near the mound.

Lynn fielded it but rather than throw to first for the sure out he rushed a throw to second. Shortstop Pete Kozma was still running to cover the bag when Lynn's throw hit squarely on the base and bounced into center field, scoring Scutaro.

"I turned to throw it and I just threw it in the ground," Lynn said. "Just a bad play. You make a good throw there and we are out of the inning."

Cardinals manager Mike Matheny thought Kozma was in the right place, but the throw was too low.

"And to do it over again, I'm sure he'd like to take the easy out at first base and then try his luck on Belt," Matheny said. "Didn't work that way, and we were stuck in a spot where it just kind of spiraled at that point in a hurry. And that was the game."

The Cardinals still had a chance to escape a big inning when Brandon Belt lined to second for out No. 2. But Lynn walked Gregor Blanco and No. 8 hitter Brandon Crawford hit a two-run single on a full-count pitch. Zito beat out a surprise bunt to score Blanco and chase Lynn.

"We got a break tonight on that throw," Giants manager Bruce Bochy said. "You take that."

Pablo Sandoval hit a solo homer off reliever Mitchell Boggs in the eighth.

Lynn wasn't the Cardinals' only problem. St. Louis mustered little offense, missing on their only big chance against Zito in the second.

Yadier Molina singled and David Freese doubled just out of the reach of the diving Pence to put runners on second and third. But Daniel Descalso struck out. After Kozma was intentionally walked, Lynn — 3 for 50 in the regular season — grounded into a double play.

St. Louis also wasted a leadoff double by Craig in the fourth. The Cardinals were 0 for 7 with runners in scoring position.

Now, the Cardinals turn to their big-game pitcher in their bid for a NL-best 19th pennant. Carpenter is 10-3 lifetime in the postseason but was just OK in Game 2, giving up two runs in five innings and taking the loss in a 7-1 game.

Vogelsong was much better, yielding one run and four hits in seven innings.

"We have to put a better game plan together than the last time and execute it," Matheny said.

Lynn was a surprise All-Star after moving from the bullpen into the rotation when Carpenter was lost to a nerve injury in spring training. An 18-game winner, Lynn was much better in the first half than the second. He was 11-4 with a 3.41 ERA at the All-Star break, 7-3 with a 4.32 ERA after and was briefly relegated to the bullpen.