ST. LOUIS (AP) — Kolten Wong hit a leadoff home run in the bottom of the ninth inning as the resilient St. Louis Cardinals beat the San Francisco Giants 5-4 Sunday to level the National League Championship Series at one game each.

The Cardinals won after losing All-Star catcher Yadier Molina to a strained oblique muscle in the sixth. There was no immediate word on how long he would be sidelined.

"We just knew we had to keep grinding," Wong said. "When you lose someone like Yadi, it's definitely tough for us, but we told ourselves we've been going through this all year. Grinding up and down, not getting any easy pass, so we're all so confident."

In a back-and-forth game, St. Louis then got late homers from rookie pinch-hitter Oscar Taveras and Matt Adams to take a 4-3 lead.

It was a rare postseason failure for the reliable San Francisco bullpen, which allowed a home run in each of the final three innings.

"They are the reason we're in this situation, and you give (the Cardinals) credit," manager Bruce Bochy said. "They threw out some good at-bats and we made a couple of mistakes and they took advantage of them."

The Giants leveled it when pinch-runner Matt Duffy dashed home from second base on a two-out wild pitch in the ninth.

The best-of-seven series resumes Tuesday night with Game 3 in San Francisco with John Lackey going for St. Louis and Tim Hudson starting for the Giants.

Wong hit the second pitch from Sergio Romo for his second big home run this postseason. The rookie's seventh-inning drive was the decisive blow in Game 3 of the NL Division Series against the Los Angeles Dodgers.

St. Louis, last in the NL with 105 home runs during the regular season, has hit 11 homers in six playoff games — seven in the seventh inning or later.

Seth Maness retired Pablo Sandoval on a comebacker with the bases loaded to end the top of the ninth, and got the win.

Maness came on after closer Trevor Rosenthal couldn't hold a one-run lead. Rosenthal's pitch bounced off the glove off backup catcher Tony Cruz and Duffy, running on a full count, never broke stride and slid home with the tying run.

Molina bent over in pain after a swing and didn't make it out of the batter's box on a double-play ball in the sixth. Wincing, he gingerly walked off the field.

Adams, whose three-run shot off Clayton Kershaw put St. Louis in front for good in their clinching playoff win over Dodgers, homered off Giants reliever Hunter Strickland.

Gregor Blanco's fourth postseason hit in 31 at-bats put the Giants up 3-2 in the seventh, but Taveras re-tied it in the bottom half with a homer off Jean Machi just inside the right-field foul pole.

Carpenter hit a solo home run off Jake Peavy in the third. Randal Grichuk singled with the bases loaded in the fourth to make it 2-0.