SAN FRANCISCO (AP) - Javier Báez homered in the first inning, Kris Bryant and Albert Almora Jr. also went deep, and the Chicago Cubs beat the San Francisco Giants 4-1 Wednesday after starter Jon Lester was scratched with an illness.
Báez hit his 25th homer and Bryant his 21st to help Chicago avoid a three-game sweep. The Cubs bounced back from a 5-4, 13-inning loss Tuesday night to give manager Joe Maddon his 442nd win with Chicago, tying Joe McCarthy for fifth in franchise history.
Bryant left in the fifth inning because of soreness in his right knee.
Kyle Ryan (3-1), the second of six pitchers used by the Cubs in place of Lester, retired five batters. Craig Kimbrel allowed two singles in the ninth but got Brandon Belt to fly out for his seventh save.
Earlier in the day, the Cubs optioned shortstop Addison Russell to Triple-A Iowa about two months after Russell completed a 40-game suspension for violating Major League Baseball's domestic violence policy. The move made room for catcher Willson Contreras to return from the injured list.
Stephen Vogt doubled twice and had three hits for San Francisco. The Giants had won 17 of 20 games.
The Cubs lead in the NL Central was down to a half-game before tagging San Francisco starter Tyler Beede (3-4) for three home runs in the first four innings.
Báez homered in the first and then scored on Bryant's two-run blast in the third. Almora added his 10th home run in the fourth.
Chicago won despite a depleted lineup. Beyond Lester and Bryant, first baseman Anthony Rizzo was ejected after striking out to end the fifth.
Tyler Chatwood started in placed of Lester and allowed one run in four innings.
Beede had been unbeaten with a 1.66 ERA in three July starts but couldn't keep the streak going against the Cubs. Beede allowed four runs and 10 hits in 5 2/3 innings and matched his carer-high with seven strikeouts.
Chicago second baseman Robel Garcia made a pair of diving stops to take away hits from Mike Yastrzemski and Joe Panik. Cubs left fielder Kyle Schwarber also made a tumbling catch on Belt's sinking fly ball to end the seventh.
Cubs: Contreras went 1 for 4. He had been out since July 14 with a right foot strain.
Giants: 3B Evan Longoria (left foot plantar fasciitis) will accompany the team on its upcoming nine-game road trip and could be activated off the injured list soon. Longoria is eligible to come off the IL on Friday. ... Buster Posey had the day off.
Cubs: LHP José Quintana (8-7, 4.42 ERA) takes a four-game winning streak into Friday's game at Milwaukee. Quintana has six wins in 13 career starts against the Brewers.
Giants: RHP Jeff Samardzija (7-8, 4.08) faces San Diego on Friday night for the second time this season. Samardzija beat the Padres on July 1 when he allowed two runs in eight innings.