ST. LOUIS -- Pinch hitter Jon Jay wasn't choosy when he came up to bat for the Cardinals in the eighth inning.
Jay delivered a two-run double on the first pitch and right fielder Shane Robinson threw out the potential tying run at the plate in the ninth to help St. Louis hold off the San Diego Padres 4-3 on Thursday night.
"I was trying to be aggressive," Jay said. "I wanted something over the plate I could handle. I was able to do that."
Jhonny Peralta hit an early two-run homer for the Cardinals, who moved ahead of Pittsburgh into second place in the National League Central. St. Louis remained two games behind division-leading Milwaukee.
San Diego had its five-game winning streak snapped and fell to 16-9 since the All-Star break.
Trailing by two in the ninth, the Padres loaded the bases with one out against closer Trevor Rosenthal. Pinch hitter Jake Goebbert came through with an RBI single to right, but Alexi Amarista was cut down at home when he tried to score from second.
The replay review lasted 4 minutes, 9 seconds. Padres manager Bud Black then was ejected by plate umpire Bob Davidson for continuing to argue the call.
"You saw two major league players react to a play that indicated that a tag was missed," Black said. "You saw their catcher go back and try to tag our runner because he knew he missed him. You saw our player react knowing that he wasn't tagged. So you saw two experienced major league players react to a play that they both knew wasn't a tag.
"That's what's frustrating to us."
Cardinals catcher A.J. Pierzynski, who entered in the ninth, disagreed.
"I thought I got his arm," Pierzynski said. "I couldn't hear Bob. It was a big play in the game for sure. I couldn't see the umpire who was behind me. You just go. You hope they stay with the call. I think they got it right."
Given another chance, Cruz singled on the next delivery.
"I definitely fouled it," Cruz said. "I knew I foul-tipped it. I saw him (Davidson) looking at the first-base umpire (John Tumpane), and he called it that way, too."
Nick Vincent entered to face Jay, who went after the first pitch and drove a one-hop double off the wall in center to snap a 2-all tie. Jay is 5-for-17 with three RBIs as a pinch hitter. He has a six-game hitting streak with seven RBIs.
"It was a good feeling. You just want to contribute if you're not playing," Jay said. "You want to stay ready so if your number gets called you can go out there and contribute."
The move by manager Mike Matheny paid off.
"A huge hit for us. He's been swinging the bat well," Matheny said. "He's had a nice season for us."
Seth Maness (4-2) earned the win with one spotless inning of relief.
Peralta hit his 16th home run to drive in Matt Adams, who led off the second with a single. That lifted Peralta into a tie with Edgar Renteria (2000) and Daryl Spencer (1960) for the St. Louis single-season record for home runs by a shortstop.
The Padres tied the score with two runs in the sixth after loading the bases with none out. Venable scored on a fielder's choice. Medica, who had doubled, came home when Rymer Liriano beat out an infield single with two outs.
Both starters went seven innings.
Cardinals right-hander John Lackey improved on his previous start in Baltimore that resulted in nine earned runs over five innings. Lackey allowed five hits and two runs with five strikeouts.
Eric Stults gave up two runs and four hits for San Diego. Stults has allowed three or fewer earned runs in nine of his past 10 starts.
Cardinals: Adam Wainwright had a familiar catcher for his bullpen session in Yadier Molina. On July 11, Molina had surgery to repair a torn ligament in his right thumb. Molina wore a brace on the thumb. He had yet to throw a ball or hold a bat without wearing the brace. ... Relief pitcher Jason Motte (strained lower back) is eligible to come off the disabled list Sunday, but he won't be ready.
Cardinals rookie Oscar Taveras was not in the lineup. Taveras went 2-for-20 on the recent six-game road trip, and his batting average dropped to .206.
Robinson started in right. He made a running catch and used his bare hand to brace himself at the wall on a first-inning drive by Medica.