CHICAGO (AP) - Jeff Bianchi delivered a two-run single off shortstop Starlin Castro's glove with two out in the ninth to lead the Milwaukee Brewers to a 3-2 victory over the Chicago Cubs and a day-night doubleheader sweep on Tuesday.
The Brewers pulled out the nightcap after a 6-5 victory in which they lost starter Yovani Gallardo to a tight left hamstring.
In the second game, they got six scoreless innings from Tyler Thornburg and a leadoff homer from Juan Francisco in the fifth. But they had to rally after David DeJesus delivered a two-run double off Burke Badenhop following a pair of errors in the seventh.
Chicago took a 2-1 lead to the ninth, but closer Kevin Gregg (2-3) couldn't hold it.
He gave up a leadoff single to Francisco and an infield hit to pinch-hitter Jean Segura with two out before walking Logan Schafer on what the Cubs thought was strike three.
Then, Castro decided to dive for Bianchi's soft liner to deep short when he might not have needed to, and the ball hit off his glove, allowing two runs to score.
DeJesus made a lunging catch in deep center to rob Jonathan Lucroy and end the rally.
That made a winner of Badenhop (2-3), who gave up two unearned runs in two innings.
Jim Henderson worked the ninth for his 14th save in 17 chances and second of the day. He also survived a wild ninth in the opener.
In his first start this season and seventh appearance, Thornburg allowed just four hits and struck out six while walking three.
Jake Arrieta went six innings in his Cubs debut, allowing one run and two hits. He was acquired in the deal that sent Scott Feldman to Baltimore this month.
In the opener, Segura hit a solo homer and the go-ahead double, Khris Davis added a three-run shot, and the Brewers rallied to beat Chicago after Gallardo hobbled off the field in the fifth.
His status was up in the air, and manager Ron Roenicke said the team will know more after Gallardo is examined by team physician Dr. William Raasch on Wednesday.
"We're not sure as far as length of time," Roenicke said.
Davis' homer in the seventh on the first pitch from reliever James Russell (1-3) wiped out a 5-2 deficit, and Segura capped the four-run rally with an RBI double, giving the Brewers a 6-5 lead.
Milwaukee survived a major scare after Jim Henderson came on in the ninth.
Pinch-hitter Dioner Navarro walked with two out and Welington Castillo barely missed a winning homer, driving a 2-0 pitch just foul beyond the left-field wall. He wound up walking before pinch-hitter Ransom flied to center, giving Henderson 13 saves in 16 chances.
Segura and Betancourt hit solo homers as Milwaukee built a 2-0 lead, but that unraveled in the fifth.
The Cubs tied season highs with five runs and six hits in the inning. Gallardo came up clutching his leg after delivering a 1-2 pitch to Darwin Barney with two out and the bases loaded and immediately left the game.
Barney delivered a tying two-run single off John Axford, and Castillo, Carlos Villanueva and DeJesus followed with run-scoring singles to make it 5-2.
Gallardo, whose name has come up in trade rumors, allowed three runs and six hits. He first felt pain in the hamstring in the fourth, when he made a diving catch on Villanueva's bunt.
"As soon as I released it, it kind of tightened up a little bit," Gallardo said. ". After I felt it on that pitch I figured it was going to be a little difficult to stay in there."
After Axford got knocked around, Rob Wooten (1-0), Brandon Kintzler and Michael Gonzalez each pitched a scoreless inning before the Cubs threatened against Henderson.
Villanueva, who gave up six hits and four runs in 6 1-3 innings for Chicago, was in line for the win after dropping his previous three starts before the Brewers rallied against Russell.
NOTES: Although Jeff Samardzija's name has surfaced in trade rumors, Cubs manager Dale Sveum said he thinks it's "very, very far-fetched" that he gets dealt before Wednesday's deadline. Samardzija, 6-9 with a 3.75 ERA, is not scheduled to become a free agent until after 2015. ... RHP Scott Baker (Tommy John surgery) continued to struggle in his fourth minor league rehab start on Monday, giving up three hits and two runs in 3 1-3 innings for Class A Daytona. "I'm not too concerned because we don't have a need right now," Sveum said. ... Roenicke said he didn't expect any deals before the deadline. ... Marco Estrada threw 2 2-3 innings Monday for Milwaukee's Arizona Rookie League team in his first appearance rehabbing from a strained left hamstring suffered June 3. Roenicke said Estrada will pitch Friday, although the location hasn't been determined, and that he'll need a minimum of two more starts before returning. ... RHP Edwin Jackson (6-11, 4.89 ERA) starts Wednesday for the Cubs, and RHP Wily Peralta (7-10, 4.54) pitches for Milwaukee.
(Copyright 2013 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.)