Yadier Molina hit an RBI single in the bottom of the 12th inning that scored Reggie Sanders from second base and lifted the Cardinals over the Pirates 2-1 on Tuesday night.

Jason Bay hit a two-out solo home run off Cardinal starter Jason Marquis in the top of the first. After that the Cardinal pitching staff bent but never broke. Jason Marquis, Brad Thompson, Randy Flores, Julian Tavarez, Ray King and Al Reyes allowed a combined 10 hits and six walks, but no runs after Bay went deep. Reyes pitched the final 1 2/3 innings to earn the win. Jason Marquis threw 112 pitches over five innings and allowed six hits and five walks with four strikeouts.

Trailing 1-0 in the fourth, the Cardinals tied the game on an error. With a man on first base in the fourth, Sanders grounded to second baseman Jose Castillo, who tossed to Wilson for a force out. Wilson’s relay to first base went wild and Larry Walker scored from second base.

The victory gave manager Tony LaRussa his 823rd win as manager of the Cardinals. That moved him past Whitey Herzog on the franchise career win list. He trails Red Schoendienst, who had 1,041 wins with the team.

The Royals out-hit the Rangers 10-7 but those hits didn’t lead to enough runs to get the win—they fell to Texas 4-3 on Tuesday. Richard Hidalgo drove in three of the Rangers four runs with homers to lead the charge. He drove in the first two runs of the game with a two-run homer in the second inning.