ST. LOUIS -- If the game is close, count on Arizona finding a way to win it.
Paul Goldschmidt's RBI single in the top of the 14th inning Tuesday night snapped a tie and lifted the Diamondbacks past St. Louis 7-6 in a battle of division leaders at Busch Stadium.
Josh Collmenter (2-0) worked four scoreless innings to earn the win, stranding the winning run in scoring position in the 11th, 12th and 13th. Heath Bell, Arizona's eighth pitcher, garnered his 10th save, fanning Pete Kozma with the tying run at second to end the 4-hour, 53-minute endurance test.
Victor Marte (0-1) walked Cody Ross to start the 14th. After Ross was forced at second on Gerardo Parra's bunt, Didi Gregorius drew a walk and Goldschmidt laced a 2-2 pitch up the middle to score Parra.
It was Goldschmidt's National League-leading 49th RBI of the year and wrapped up a three-hit night for the slugging first baseman. It also wrapped up the Diamondbacks' seventh win in nine extra-inning games, improving them to 33-25.
"We didn't give in," Arizona manager Kirk Gibson said. "We've had several of these close games this year. St. Louis has the best record in the majors and they have a lot of talent. Tonight, we matched them and beat them."
The Cardinals (38-20) dropped to 0-4 in extra innings, but stayed three games ahead of Cincinnati in the Central. They wasted the first four-hit game of David Freese's career and excellent work from their bullpen, which picked up the pieces after rookie starter Michael Wacha burped up 10 hits and six runs before leaving with two outs in the fifth.
"You feel it a little more on these long nights," Freese said. "That's a good team we're playing. You hear those guys on the other side of the field, they want to win every inning. They took care of business tonight."
The Cardinals tied the game at 6 in the seventh on Carlos Beltran's RBI single that scored Ty Wigginton. They derived a big break an inning earlier when Beltran was called safe on a steal of third by fill-in umpire Jordan Baker even though he was tagged out by Martin Prado.
Yadier Molina singled Beltran home three pitches later, cutting the Diamondbacks' lead to 6-5 and knocking out starting pitcher Tyler Skaggs. While Brad Ziegler was warming up, Baker tossed bench coach Alan Trammell for chirping about the call.
"It was nothing bad," Gibson said when asked what Trammell said to earn the ejection. "He didn't swear. It's just that the umpire had a short fuse."
"I let him know I disagreed," Prado said of his brief argument with Baker, "but you're not going to change their decision. You've got to keep playing, keep grinding it out all the way through."
St. Louis scored first for the seventh time in its last nine games on Matt Holliday's sacrifice fly in the bottom of the first inning. Arizona evened the score in the second when Skaggs helped his cause with a two-out, two-strike single into left, plating Willie Bloomquist.
The Diamondbacks snapped the 1-1 tie in the fourth when A.J. Pollock rifled a three-run homer into the seats in left-center, his fifth of the year. The Cardinals cut it to 4-3 in their half of the fourth on Allen Craig's towering two-run clout to left-center, his fourth this season.
Arizona knocked out Wacha during a two-run fifth that featured Goldschmidt's RBI double to right-center and Jason Kubel's two-out, two-strike single to left that scored Goldschmidt.
Shane Robinson drew St. Louis within 6-4 with a leadoff homer in its half of the fifth, his first this year and only the fourth in his career.
Relievers Seth Maness, Trevor Rosenthal, Edward Mujica and Keith Butler allowed just three hits and a walk over 8 1/3 innings for the Cardinals, giving them numerous chances to win in extra innings.
But Collmenter fanned Holliday with a man on second to end the 11th, struck out Kozma with two on to finish the 12th and induced a flyout from Craig with men on the corners to conclude the 13th. Goldschmidt then delivered the winning blow as the Diamondbacks improved to 13-7 in one-run games.
"It feels good to play that long and come out on top," Pollock said. "A lot of things didn't go our way, but we battled."
NOTES: St. Louis will give reliever Joe Kelly his first start of the season Wednesday night. Kelly (0-2, 6.75) made 16 starts last year, but has been used strictly as a reliever in 2013 after losing the No. 5 starter job in spring training to Shelby Miller. The Cardinals need a spot starter because of Saturday's makeup doubleheader. ... Arizona optioned RHP Randall Delgado to Triple-A Reno to make room for Skaggs ... Dana DeMuth was behind the plate, his second consecutive marathon contest. DeMuth worked a 17-inning game Friday night between San Diego and Toronto.