ST. LOUIS -- Just a few days ago, the St. Louis Cardinals had no wins when trailing after eight innings and just one extra-inning victory.
They certainly showed the Pittsburgh Pirates they can go the extra mile.
"We did a good job of bouncing back," said Matt Holliday, who hit a game-ending RBI single in the 12th inning of St. Louis' 6-5 victory over Pittsburgh on Thursday. "Winning this game could be very important for us."
Matt Carpenter had four hits and scored the winning run in the Cardinals' second extra-inning triumph over the NL Central leaders in three days.
"Anytime having a walk-off win, it's a big deal," manager Mike Matheny said. "Jumping on it again it today is just the resiliency of this club.
"You could sense it on the bench. The guys weren't going to give in, weren't going to stop pushing."
The Cardinals took two of three in the series to pull within two games of the sagging Pirates, who have dropped five of six. St. Louis won 4-3 in 14 innings in the opener on Tuesday night.
"We had a number of guys that had opportunities," Pirates manager Clint Hurdle said. "The great thing about what we're going through is the challenge and opportunities we're all getting.
"It's playoff atmosphere baseball."
The Cardinals lost the division lead when they dropped four of five in Pittsburgh from July 29-Aug. 1.
Rookie Kevin Siegrist (1-1), St. Louis' seventh pitcher, struck out two in a perfect 12th against the heart of the order.
Carpenter, the Cardinals' leadoff man, leads the National League with 48 multihit games and 40 doubles. He entered with league-leading averages of .366 at home and .367 in day games.
Holliday also had an RBI double and is batting .452 during a 12-game hitting streak.
Martin hit a tying leadoff drive off Trevor Rosenthal in the eighth, handing the setup man his second blown save of St. Louis' 4-6 homestand.
The Pirates hit for the cycle against Lance Lynn in a four-run fifth that featured rookie Andrew Lambo's first hit and RBI on a double and Barmes' two-run homer. The Cardinals responded by knocking out A.J. Burnett with five runs in the bottom half on a two-run single by Daniel Descalso and RBIs in consecutive at-bats from Carpenter, Jay and Holliday.
"As good as it looked early, it's never easy against this group," Burnett said. "They figured me out early."
Both managers put a heavy stamp on the game. Hurdle hit for two regulars in the sixth and emptied his bench, and Matheny used three relievers in the sixth and seventh.
The Pirates begin a three-game homestand Friday against the Diamondbacks. Pittsburgh rookie Gerrit Cole (5-5, 3.95 ERA), who opposes Brandon McCarthy (2-6, 4.73 ERA) in the opener, has lost five of his last six decisions. ... The Cardinals open a three-game series at Chicago, with St. Louis' Jake Westbrook (7-7, 4.11 ERA) opposing minor league callup Jake Arrieta. It will be Westbrook's first appearance since giving up nine runs in 4 2/3 innings of relief on three days' rest after Shelby Miller was knocked out by a liner off his elbow on his second pitch of the game. ... Cardinals reliever Seth Maness, who grounded into a double play and struck out to strand five runners Tuesday night, got his first career hit in the sixth. ... Pirates reliever Tony Watson worked three scoreless innings and retired the heart of the order in the 10th.
Chapman slaps 3-run homer vs. Padres
The Athletics take an early 4-0 lead over the Padres as Matt Chapman hits a three-run home run to left field in the first inning.
Javier Baez of Chicago Cubs fined for taunting, avoids suspension
Cubs shortstop Javier Baez was only fined by MLB for taunting Reds pitcher Amir Garrett after a walk-off bases-loaded single on Monday. Cubs manager David Ross had feared that the shortstop would be suspended.
Houston Astros bolster pen, deal for Miami Marlins closer Yimi Garcia
The Astros have acquired reliever Yimi Garcia from the Marlins for two players.
4 Nats players, 8 staffers test positive, game vs Phils ppd
— Four Washington Nationals players and eight staffers have tested positive for COVID-19, forcing Major League Baseball to postpone their game against the Philadelphia Phillies on Wednesday night.
Lions-Vikings? Naw, Tigers top Twins by NFL-like 17-14 final
— Playing to a score befitting an NFL matchup, the Detroit Tigers and Minnesota Twins also were counterpunching like the best of boxers.
Washington Nationals see 4 players, 8 staffers test positive for COVID-19; game at Phillies postponed
The Nationals' game at Philadelphia on Wednesday night was postponed after 12 members of the team, including four players, tested positive for COVID-19.