CHICAGO -- The Chicago Cubs continued to flex their home run muscles on Friday.
The Cubs (25-21) hit three solo homers and closed a nine-game home stand with 20 as they beat the San Francisco Giants 5-1.
"We know a lot of good things can happen if we're patient and aggressive in the strike zone, at the plate," said Jason Heyward, who had one of the Cubs' homers. "You can get a lot of momentum that way."
The decision wrapped up a 7-2 home stand, their best since going 8-2 between Aug. 9-18, 2016.
The Cubs have 26 home runs in their last 14 games, second most in the majors in that span.
They also had solid pitching performances from starter Eddie Butler (2-0) in a five-inning effort and an extended four-inning outing from reliever Mike Montgomery, who earned his first save.
"It could have been a little better today; a couple times I just failed to keep the ball in the zone and I really just need to attack the guys even more," said Butler, making his third start since a call up from Triple-A Iowa.
Butler, who hopes to maintain a starting spot, allowed one run on four hits. He walked two and struck out a pair.
Montgomery, meanwhile, walked one and gave up one hit.
"It was fabulous," Cubs manager Joe Maddon said of Montgomery's effort. "We've had him out there different times and (the Giants') lineup was really built for his abilities. The big thing with Mike is that if he's throwing strikes, he's going to pitch really well versus righties and lefties. And he did."
Giants starter Jeff Samardzija fell to 1-6 in his seven-inning appearance as San Francisco dropped its third straight.
"Against a team like (the Cubs) it's a fine line," Samardzija said. "When you're facing a lineup like theirs you've got to be on the whole time. We gave up a leadoff home run to Heyward (in the fifth inning) and that can't happen. You've got to regroup there and get your pitches down in the zone and get an out."
San Francisco scored first for the third time in the four-game series as Brandon Belt doubled home Denard Span from third base with one out in the top of the first. Span reached on a leadoff two-base hit and advanced to third on Joe Panik's sacrifice.
The Cubs replied with two out in their half of the frame when Bryant launched Samardzija's first pitch into the left-field bleachers for a solo home run, his 11th of the season.
The Giants questioned whether there was fan interference on Bryant's homer, but Giants manager Bruce Bochy said they weren't able to challenge since a phone to the dugout was not operating.
Heyward lined his solo home run to right field -- his fifth of the season -- to lead off the fifth and give the Cubs a 2-1 lead.
Zobrist connected on the Cubs' third solo shot to lead off the sixth inning, sending Samardzija's 2-1 offering to right for his sixth of the season and a 3-1 Chicago lead.
Samardzija worked through seven innings before he was pulled for a pinch hitter. He gave up three runs on six hits, struck out eight and walked one while throwing 115 pitches.
The Cubs had the bases loaded with two out in the eighth against Giants reliever Josh Osich and scored two more runs on a wild pitch and an error during Heyward's at-bat.
"We just sputtered offensively and that, to me, was probably the biggest difference," Bochy said. "The eighth, we let get away. It's a 3-1 game and you'd like to keep it that way. But wild pitches scored two runs."
NOTES: San Francisco INF Eduardo Nunez sat out the series finale after tweaking his left hamstring during Wednesday's 5-4 loss to Chicago. ... The Giants remain the only major league team without a three-run homer this season. Their 40 homers include 33 solo shots. ... San Francisco returns home for a three-game series with the Atlanta Braves and will send RHP Matt Cain (3-2, 4.91 ERA) against Braves LHP Jaime Garcia (1-3, 4.07 ERA). ... The Cubs open a three-game series on Friday at the Los Angeles Dodgers, sending RHP Jake Arrieta (5-3, 4.80 ERA) against LHP Alex Wood (5-0, 1.88 ERA) . ... The Cubs allowed their 45th first-inning earned run on Thursday and own an 8.80 ERA in the opening inning. ... 2B Ben Zobrist singled in the third inning to extend an on-base streak to 22 games, the big league's third-longest streak, topped only by Cincinnati's Joey Votto (27) and Seattle's Mitch Haniger (25). He later homered to right. ... Chicago returns to Wrigley Field on June 2 to face the St. Louis Cardinals.