CHICAGO -- Madison Bumgarner emerged victorious in a late-season meeting of ace pitchers in a playoff atmosphere Saturday at Wrigley Field.
Bumgarner got the better of Jake Arrieta and the Cubs (87-48), who own the best record in baseball. The Cubs fell to 50-20 at home and saw their five-game winning streak snapped after they won the first two games of the four-game series against the Giants (73-62).
Since the All-Star break, the Giants are just 16-29.
"I don't think (the Cubs) clinched yet, but they're going to be there (in the playoffs). And we're planning on being there," Bumgarner said. "So it's a playoff-type of matchup."
The Cubs' Anthony Rizzo drew a walk against Will Smith to begin the bottom of the ninth. After closer Santiago Casilla replaced Smith, Dexter Fowler's sacrifice bunt moved Rizzo to second, but Rizzo overran second and was tagged out for a double play.
"That's huge," Giants manager Bruce Bochy said. "Heart of the order up, man on second, it's a different game. That was a big double play."
"Rizzo is trying to be aggressive there," Cubs manager Joe Maddon said. "You'd rather he had not, but he did. I love the intensity and the passion of the game."
Kris Bryant lined out to conclude the game. Casilla earned his 30th save.
Bumgarner, a four-time All-Star, had a 6.35 ERA in his last three starts, yet he entered the game 7-2 with a 2.19 ERA in 11 previous career starts against the Cubs.
"I felt pretty good every time I've faced them," he said.
Reigning Cy Young Award winner Arrieta (16-6) gave up three runs -- two earned -- and four hits in six innings. He struck out seven, walked two and threw two wild pitches, including one that allowed a run to score.
"The outing was average," Arrieta said. "But it's still good enough to keep us in the game. We just came up a little short."
Arrieta leads the National League in victories and is sixth in ERA. In his previous start, he matched a season high of six runs allowed in 6 1/3 innings Monday against Pittsburgh.
Angel Pagan doubled and later scored on third baseman Tommy LaStella's high throw to first base in the first inning to give the Giants the lead.
"Overall it was OK," Arrieta said of his performance. "I had an opportunity to stop, it was in the fourth, to prevent some things from happening. Just got to do a better job of being more aggressive in that situation."
The Cubs cut the lead to one in the fifth. Javier Baez singled, stole second and scored from second on Arrieta's infield single. Baez beat shortstop Brandon Crawford's throw to home with a head-first slide.
Arrieta moved to second when Bumgarner was called for a balk, but Bumgarner ended the inning with a strikeout.
"He commanded the ball well," catcher Buster Posey said of Bumgarner. "He did a good job of staying out of the middle of the plate, for the most part."
In the sixth inning, Crawford singled, stole second and then swiped third with no one covering before he scored on Arrieta's wild pitch to put the Giants ahead 3-1 in the sixth.
"The one thing you like to get back is Crawford going to third base uncovered," Maddon said.
The Cubs pulled to within 3-2 in the bottom of the sixth.
Zobrist scored on Baez's sacrifice fly in foul territory in right field. Matt Szczur struck out with two runners on to end the inning.
The Cubs left the bases loaded in the seventh when Russell flew out with two outs.
In the eighth, a review overturned Baez getting on base. He slid head-first to try to beat reliever Sergio Romo's feet-first sliding tag of first base. Boaez was originally called safe, but was ruled out after the review.
The Giants saw their franchise-record 17-game errorless streak end in the first when first baseman Brandon Belt dropped a popup on the mound.
"We haven't been playing bad baseball," Bumgarner said. "We've just been coming up a little short. Today was a good win for us and it won't take much to get us started on the right track again."
NOTE: The Giants purchased the contract of RHP Joe Nathan from Double-A Richmond on Saturday. Nathan signed as a free agent with the organization on Aug. 16 after the Cubs released him Aug. 8. He previously pitched for the Giants from 1999-2003 before he and LHP Francisco Liriano were traded to the Minnesota Twins for C A.J. Pierzynski and cash in 2003. ... The Giants recalled RHP Ray Black from Double-A Richmond and put him on the 60-day disabled list to make room for Nathan. ... Cubs setup man Hector Rondon (triceps) said he was feeling good after he threw a 22-pitch simulated game Saturday. His plan for a rehab assignment at Triple-A Iowa was canceled. He could be activated from the disabled list Monday. ... Cubs RF Jorge Soler (ingrown toenail) was a late scratch from the lineup but struck out as a pinch hitter in the fifth. ...Giants RHP Derek Law (elbow) has yet to start throwing since going on the disabled list Aug. 28. Manager Bruce Bochy said he expects Law to be at full strength when his 15 days on the disabled list end on Sept. 12.