CHICAGO -- Julio Borbon's pinch-single scored the winning run in the 14th inning as the Chicago Cubs beat the Cincinnati Reds 6-5 on Thursday and avoided a four-game sweep.
Borbon, who came to the plate with runners at first and third with two out, lined a single off Reds reliever Jonathon Broxton to drive home Starlin Castro with the winning run.
Castro singled to open the bottom of the inning, stole second and reached third on Alfonso Soriano's groundout to first. Nate Schierholtz was intentionally walked to set the stage for Borbon.
The Reds threatened in the top of the 14th with runners at second and third and two outs, but Cubs reliever Hector Rondon struck out Derrick Robinson on a 3-2 pitch.
Castro and Welington Castillo each had three hits and Schierholtz tripled twice and scored three times, including the tying run in the eighth off reliever Sam LeCure.
The Cubs snapped a three-game losing streak and also denied Reds starter Mat Latos a chance to go 7-0.
Chicago's victory snapped Cincinnati's record-setting run of 12 consecutive victories at Wrigley Field, the most ever by any opponent.
It was the fourth extra-inning game between the Reds and Cubs and first at Wrigley Field this season. Chicago had won two of the previous three.
Rondon, the Cubs' seventh pitcher, worked the final two innings for his first win of the season. He struck out four and allowed one walk.
Broxton (2-2) pitched 2/3 of an inning, giving up two hits while striking out one and walking one.
Latos gave up single runs in four of the six innings he pitched and departed with a 5-4 lead. Cubs starter Jeff Samardzija worked six innings and gave up 10 hits and five earned runs. He walked four and struck out six.
Castro singled in the first inning, stole second and gave the Cubs a 1-0 lead as he scored when Soriano's bloop to center dropped safely between three Reds.
Cincinnati jumped ahead 2-1 with two outs in the second when Devin Mesoraco singled home Jay Bruce, advanced to third on Latos' single to shallow right and scored on Shin-Soo Choo's base hit to left.
Schierholtz tripled to open the Cubs' fourth and tied the score when he came home on Castillo's one-out single to center.
Cincinnati reclaimed the lead in the fifth. Samardzija gave up RBI singles to Joey Votto and Brandon Phillips that made it 4-2
Chicago got one back on David DeJesus' leadoff home run -- his sixth homer of the season -- in the bottom of the fifth.
In the sixth, Votto's bloop dropped for a hit that scored Choo for a 5-3 Reds lead.
Schierholtz tripled again in the sixth -- this time with one out -- and cut the deficit to 5-4 when he scored on Luis Valbuena's groundout to first.
Schierholtz was in scoring position again in the eighth after walking with none out. He tied the score when Barney lined an RBI single to right.
The Cubs hit the road with stops in New York and Houston. Right hander Edwin Jackson (2-8) faces Mets righty Shaun Marcum (0-7) in Friday's opener of a three-game weekend series.
The Reds are back home for three games with the Brewers, starting Friday as Bronson Arroyo (6-5) meets Milwaukee's Kyle Lohse (2-6).
NOTES: Sunday's pitcher is still to be determined for the Reds, but they hope it will be Johnny Cueto coming off the disabled list for the start against the Brewers. He has been sidelined with a sore right shoulder since June 5. ... Joining the Reds with a dozen-plus wins at an opponent's park are the Philadelphia Phillies, who beat the San Diego Padres 13 straight games from Aug.17, 2008, through April 20, 2012. ... Wednesday's 40th victory in their 66th game was the Reds' fastest to 40 since 1995. ... Castro appears to be finally shaking out of a slump with three hits on Thursday. He came into the game hitting .238 with three home runs. A year ago, he was hitting .302 with eight homers. ... After winning a season-high five straight from May 27 to May 31, the Cubs have gone 3-8 in June and are 2-5 in their last seven games. ... The teams meet again Aug. 12-14 at Wrigley Field.