ST. LOUIS — Ryan Sweeney and Cody Ransom hit back-to-back home runs in a four-run first inning and that was plenty for Jeff Samardzija, who pitched the Chicago Cubs over the St. Louis Cardinals 4-2 Tuesday night.
Chicago started fast against Adam Wainwright (10-4) and broke a five-game losing streak in St. Louis.
Pinch-runner Shane Robinson was called out for interference while trying to break up a double play to end the game.
Carlos Beltran hit his team-high 17th home run for the Cardinals, who lost for the third time in five games but still lead the majors with a 45-26 record.
Samardzija (4-7) gave up two runs and seven hits in 8 1-3 innings. He struck out six and walked one for his first win since May 27, a 7-0 shutout against the Chicago White Sox.
The Cardinals cut the lead to 4-2 on an RBI single by Yadier Molina with one out in the ninth.
Kevin Gregg got David Freese to ground into a game-ending double play for his 10th save in as many opportunities. Robinson interfered with shortstop Starlin Castro on the pivot at second base.
Wainwright was trying to become the majors' first 11-game winner. 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 gave up back-to-back homers for the third time in his career. He allowed four earned runs on seven hits over seven innings.
Wainwright had won his previous five starts, but has not beaten the Cubs since Sept. 24, 2010. Wainwright, who bounced back to retire 12 in a row, had given up a total of four first-inning runs over his first 14 starts this season.
The Cubs' first-inning runs all came after two outs. Nate Schierholtz and Alfonso Soriano hit consecutive doubles before Sweeney unloaded with his second home run of the season to make it 3-0. Ransom followed with his eighth homer.
Samardzija never let a runner past second base in the first five innings and was helped out by three double plays.
Beltran hit a home run off the right-field foul pole with two outs in the sixth. Molina went 3 for 3 and leads the NL with a .363 average.