ST. LOUIS (AP) -- Adam Wainwright felt he let his teammates down Tuesday night.
The St. Louis Cardinals right-hander was seeking his major-league leading 11th win, but he gave up four runs in the first inning of a 4-2 loss to the Chicago Cubs.
Ryan Sweeney and Cody Ransom hit back-to-back homers in the first to help the Cubs break a five-game losing streak in St. Louis. Chicago started fast against Wainwright (10-4) and won for the fourth time in six games.
"If they had a happy zone, I found it," Wainwright said. "I threw it in the worst possible spot every time."
Wainwright (10-4) need just six pitches to retire the first two batters and appeared on his way to an easy opening frame. But the Cubs got consecutive doubles from Nate Schierholtz and Alfonso Soriano to set the stage for the back-to-back homers.
Wainwright had given up only two homers in his previous 14 starts this season.
"Four batters in a row, extra base hits?" Wainwright said. "I can't remember the last time I did anything like that."
Wainwright rallied and retired 12 successive batters at one point, but the first-inning damage was too much to overcome.
Carlos Beltran hit his team-high 17th homer for the Cardinals, who lost for the third time in five games but still lead the majors with a 45-26 record.
Chicago right-hander Jeff Samardzija (4-7) allowed just two runs over 8 1-3 innings to record his first win since May 27. He came into the contest winless in eight June starts. He was 2-8 with a 7.14 ERA. Both wins came in relief.
"I really want to knock this June bugaboo," he said. "I've been working really hard and I like where I am today."
Samardzija, who left with a 4-1 lead, struck out six and walked one.
"Watching from center field, he was unbelievable," Sweeney said. "He was keeping hitters off balance and still throwing 96 to 97 (miles per hour) in the ninth inning."
Manager Dale Sveum was especially impressed.
"He was as good as he's been all year against the best offense in baseball," he said. "If you can do that to them, you've had one heck of a game."
Kevin Gregg picked up his 10th save in as many opportunities. He got David Freese to ground into a strange game-ending double play. Pinch-runner Shane Robinson was called out for interference while trying to break up the play at second. Robinson was ruled to have gone out of the way to hinder the relay throw from shortstop Starlin Castro.
St. Louis manager Mike Matheny agreed with the call from crew chief Fieldin Culbreth.
"He got it right," Matheny said. "It's just frustrating to see the game end like that."
The Cardinals cut the lead to 4-2 on an RBI single by Yadier Molina with one out in the ninth. Matt Holliday and Allen Craig singled with one out to chase Samardzija. Gregg, after giving up the hit to Molina, induced Freese to hit a hot shot right at Darwin Barney, who started the double play.
Freese hit into three double plays and struck out.
The Cubs' first-inning runs all came after two outs. Schierholtz and Soriano doubled before Sweeney unloaded with his second homer of the season to make it 3-0. Ransom followed with his eighth homer.
"We just got on them early," Sweeney said. "Thankful enough that we did. If you don't get to a guy like that, he'll bear down and then you can't score any runs."
The Cubs tied a season high with four runs in the first -- they also did it in the first inning of a 10-7 loss to San Francisco on April 14.
Wainwright had won his previous five starts, but has not beaten the Cubs since Sept. 24, 2010. He had given up a total of four first-inning runs over his first 14 starts this season.
"It was unforgivable," Wainwright said. "I put my team in a really tough spot."
Samardzija never let a runner past second base in the first five innings and was helped out by three double plays.
"What else can you ask for?" Samardzija said. "Great defense. And the icing on the cake were those four runs in the first."
Beltran homered off the right-field foul pole with two outs in the sixth. Molina went 3 for 3 and leads the NL with a .367 average.
NOTES: Schierholtz has hit safely in a career-best 10 straight games. ... St. Louis OF Jon Jay has gone 215 successive games without making an error in center. He is second in team history behind Curt Flood (226). Jay last made an error on Aug. 24, 2011. His streak is the longest current run in the NL. .... Chicago signed LHP Rob Zastryzny, their second-round draft choice. ... St. Louis rookie right-hander Shelby Miller (8-4, 2.08) left after five innings of Monday's 5-2 win due to cramps caused by dehydration. He will not miss a start. ... Chicago pitchers have a league-leading 22 RBI this season.... The Cardinals signed LHP Rob Kaminsky, their second first-round selection. The 28th overall pick, Kaminsky is from St. Joseph's Regional High in Englewood Cliffs, N.J.
Copyright 2013 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.