CHICAGO (AP) -- For 25 consecutive innings, nobody had been able to score Adam Wainwright.
One inning shy of the longest shutout streak of his career, the St. Louis Cardinals ace faltered against the Chicago Cubs.
Anthony Rizzo hit a two-run single in the first inning, and the Cubs beat the Cardinals 6-5 for their third win in four games.
Wainwright had been 6-0 in 12 previous starts and five relief appearances at Wrigley Field.
"There were certain pitches today I didn't have good command over," he said. "My curveball was kind of sporadic in the zone and out of the zone, which is pretty rare for me. It's a funny game. Today was not my day. I accept that and take responsibility for today and move on."
Wainwright (5-2) had allowed six runs in 45 innings coming in, but the Cubs matched the runs total in just five innings against the St. Louis right-hander, who gave up 10 hits. His ERA rose from 1.20 to 2.16.
Wainwright had not allowed an extra-base hit since April 12 against the Cubs in St. Louis. He called his outing "very sloppy."
Chicago led 2-0 just eight pitches in. Wainwright managed to limit the damage by getting Starlin Castro to ground into a double play and retiring Nate Schierholtz on a flyout.
Emilio Bonifacio singled leading off the bottom half, and Luis Valbuena doubled down the first-base line to put runners on second and third. Cardinals manager Mike Matheny thought Valbuena's hit was foul, but it wasn't reviewable because the ball landed in front of first base umpire Larry Vanover.
"He saw where it was which was right on the line, which makes it real difficult for me to understand how it could stay fair coming from a left-hander's bat," Matheny said.
Rizzo added a leadoff home run in the fifth that put Chicago ahead 6-3. Welington Castillo had three doubles for Chicago, which sent the skidding Cardinals to their 10th loss in 16 games. Castillo became the first Cubs catcher with three doubles in one game since Damon Berryhill on Sept. 16, 1990 -- also against St. Louis.
"Especially with Wainwright, his stuff is so good he's going to eat you alive," Rizzo said. "Fortunately for us, we got to him."
Travis Wood (2-3) gave up three runs -- two earned -- and six hits in seven innings but allowed just one runner in his final three innings. Justin Grimm gave up Jhonny Peralta's two-run homer in the eighth, Hector Rondon pitched a perfect ninth for his second save.
"Right now he's got a good swing going," Matheny said of Peralta, who had three RBIs. "He's laying off a lot of the borderline pitches and ones way out of the zone. He's got a nice approach, nice and short."
St. Louis overcame its early deficit, tying the game in the third when Matt Carpenter singled in a run and scored on Peralta's double.
Chicago loaded the bases in the bottom half on a pair of walks around Castro's single. Ryan Sweeney drove in the go-ahead run with a weak grounder to second that allowed Rizzo to score from third, and Castillo followed with a two-out, two-run double.
Castro's throwing error from shortstop on Randal Grichuk's grounder allowed Yadier Molina to score and cut the deficit to 5-3 in the fourth.