ST. LOUIS -- Jeff Samardzija has a healthy respect for St. Louis' lineup.
"You watch film of this team five days before the game and you're trying to find weaknesses, and you can't find any," he said. "You just know you don't have much margin for error."
On Tuesday night, it was the Cardinals who had no margin for error against the hard-throwing Chicago Cubs right-hander. Inducing 15 ground-ball outs and coming within two outs of a complete game, Samardzija outpitched Adam Wainwright in a 4-2 win at Busch Stadium.
Samardzija (4-7) gave up Carlos Beltran's line-drive homer off the right-field foul pole in the bottom of the sixth inning and nothing else that mattered until a ninth-inning rally. He worked 8 1/3 innings, scattering seven hits and walking one while fanning six.
Pounding the zone with a fastball that was still touching 97 mph in the ninth inning, Samardzija delivered one of his best performances of the year.
"That's as good as he's been all year," Chicago manager Dale Sveum said. "Other than the home run and the run in the ninth, he shut them down. That's the best offense in baseball. He didn't have a lot of trouble."
Sveum sent Samardzija out for the ninth, but he had to go get him with one out after consecutive singles by Matt Holliday and Allen Craig. Closer Kevin Gregg came in and promptly yielded Yadier Molina's third single, scoring Holliday to put the tying run aboard.
But Gregg quashed the comeback and earned his 10th save with St. Louis' fourth double play. David Freese's sharp two-hopper to second baseman Darwin Barney became a 4-6 twinkilling when pinch-runner Shane Robinson was called for interfering with the pivot of shortstop Starlin Castro by second base umpire Fieldin Culbreth.
"He made the right call," Cardinals manager Mike Matheny said of Culbreth, the crew chief. "But it's frustrating to see the game end like that."
Sveum, who was booted from Monday night's 5-2 loss to the Cardinals after Molina was called safe on a play at the plate, was glad to see the big call go his team's way.
"About time we had one go our way in this place," he laughed. "We've had some tough losses in here the last couple of years."
While they might have experienced an anxious ending, the Cubs (29-40) were in control throughout after jumping on Wainwright (10-4) for four two-out runs in the first inning.
Nate Schierholtz and Alfonso Soriano clubbed consecutive doubles for the first run. Ryan Sweeney lined a 1-1 pitch into the right field seats for his second homer of the year, and Cody Ransom followed with a towering solo shot over the wall in left that gave Samardzija a rare cushion.
"For four batters, I found their happy zone," Wainwright said. "I just didn't execute pitches. It's a shame when you put your team in a hole like that against a pitcher like Samardzija."
After looking at video during the bottom of the first, Wainwright returned to the form that has made him one of baseball's best starters this year. He allowed just three hits after the first inning and retired 12 straight men at one point.
Wainwright worked seven innings, walking none and fanning three. It was the eighth time in 15 starts in which he didn't issue a free pass.
Samardzija allowed the leadoff man to reach in the second, fourth and fifth, but he used double play balls to quell any thoughts of a rally. Until the ninth, Beltran was the only Cardinal to pass first base.
Despite the defeat, St. Louis (45-26) maintained its 2 1/2-game lead in the National League Central when the Pittsburgh Pirates blanked the Cincinnati Reds 4-0.
NOTES: Sveum gave 1B Anthony Rizzo the night off, his first of the year. Rizzo has 10 homers, but none since May 18, and is hitless in his last 10 at-bats to drop his average down to .241 ... Matheny said rookie LHP Tyler Lyons probably will take his regular turn in the rotation Friday against the Texas Rangers despite losing his last three starts, including a 7-2 decision Sunday in Miami. There was speculation that RHP Joe Kelly could get the call in Lyons' place.