SAN FRANCISCO --Giants manager Bruce Bochy thought he was playing the odds when he brought in closer Santiago Casilla to try to close out the ninth inning against St. Louis, even as a chorus of boos rained down from the sold-out crowd at AT&T Park.
For the third time in two weeks, the San Francisco skipper guessed wrong.
Kolten Wong hit a sacrifice fly off Casilla that capped a two-run comeback in the ninth and the Cardinals rallied for a big win in their playoff chase, beating the Giants 3-2 Saturday night.
"You go on history, that's why the change was made," Bochy said of his decision to replace Sergio Romo with Casilla after Jedd Gyorko's one-out single in the ninth. "We were going with what we think is the best matchups. It didn't play out tonight."
Casilla (2-5) walked the first batter he faced, Yadier Molina, before Randal Grichuk hit a tying single.
Jose Martinez, pinch-running for Molina, took third on the hit and easily scored on Wong's fly.
Casilla's nine blown saves this season are tied with Nate Jones of the Chicago White Sox for most in the majors. It's also the most blown saves by a Giants reliever since Robb Nenn had nine in 1999.
"I'm having bad luck," Casilla said. "I was looking for a double play but we lose the game. I try to do my best. I'm not going to be sad or kill myself. It's a game."
Hunter Pence singled twice and Brandon Belt added an RBI double for the Giants, who fell five games behind the first-place Los Angeles Dodgers in the NL West.
The Cardinals had lost three straight and held a team meeting prior to the game. Their win further tightened the NL wild-card race - the Giants and Mets are tied for the top two spots, with the Cardinals trailing by two games.
Seung Hwan Oh (5-3) retired six batters for the win.
Brandon Moss hit his 27th homer for the Cardinals.