CHICAGO (AP) — Ryan McMahon lofted a two-run homer in the 10th inning, Brendan Rodgers followed with a two-run double that gave him five RBIs for the game, and the Colorado Rockies rallied to beat the Chicago Cubs 13-10 on Wednesday night and split a doubleheader that featured almost as many innings as a pre-pandemic twinbill.

The Cubs won the opener 5-2 in a tidy 2 hours, 9 minutes, thanks to Patrick Wisdom’s tiebreaking three-run homer in the fifth inning.

READ MORE: 'An Important Time For Us': Chicagoans Celebrate Hispanic Heritage Month

The nightcap lasted exactly twice as long — 4:18 — as the teams combined to play 17 innings. Major League Baseball shortened doubleheader games to seven innings last year to help teams get through COVID-19-related postponements and kept the rule in place this season.

McMahon hit a high drive off Jake Jewell (0-2) that landed with a thud in the basket in left for his 19th homer. Rodgers, who hit a two-run homer in the first inning, ripped his double down the left-field line.

Ben Bowden (3-2), the eighth of nine Colorado pitchers, got four outs in a game that took some sloppy turns. Chi Chi Gonzalez allowed the automatic runner to score in the 10th but held on to close it out as the Rockies’ three-game skid ended.

Connor Joe hit his first career grand slam in the fourth inning to put Colorado ahead 6-5. The Rockies led 8-5 after six innings before the Cubs rallied.

Ian Happ’s three-run homer off closer Daniel Bard in the seventh tied the second game at 8. Bard blew his eighth save in 28 chances.

Pinch-hitter Dom Nuñez singled in automatic runner Garrett Hampson in the eighth, giving Colorado a 9-8 lead.

But shortstop Trevor Story threw Matt Duffy’s grounder over first base with two outs in the eighth, allowing Wisdom to score and tie it at 9. Neither team could push across the automatic runner in the ninth before Colorado exploded in the 10th.

Rockies Starter German Márquez allowed five runs on seven hits in three innings. The All-Star righty has a 10.13 ERA over 13 1/3 innings in his last three starts.

Cubs starter Justin Steele yielded four runs on five hits in 3 2/3 innings in his third start since being recalled from the minors on Aug. 10.

FIRST GAME

In the opener, Wisdom launched a 1-1 slider from Austin Gomber over the left-field bleachers and onto Waveland Avenue for his 21st home run. He entered the year with four homers in 48 games over three seasons with the Cardinals, Rangers and Cubs.

Wisdom, who turns 30 on Friday, still has rookie status. He struck out in his first two at-bats before taking Gomber deep, then was 0-for-4 with a walk in the nightcap.

READ MORE: Downtown Chicago Roadblocks Quell Mexican Independence Day Street Celebrations

David Bote and Austin Romine also homered for Chicago, which won its second straight at Wrigley Field after a team-record 13-game home losing streak.

C.J. Cron hit his team-leading 22nd homer for the Rockies.

Cubs starter Zach Davies allowed two runs on three hits and struck out six in 4 2/3 innings. Codi Heuer (5-2) got the next four outs for his first win as a Cub.

Adam Morgan pitched a perfect seventh for his first save and second of his career.

Gomber (9-8) allowed five runs on five hits in 4 2/3 innings.

EXTRA MEN

The Rockies recalled INF Joshua Fuentes from Triple-A Albuquerque as the 27th man for the second game of the doubleheader. The Cubs recalled RHP Jewell from Triple-A Iowa.

TRAINER’S ROOM

Rockies: Joe collided hard with CF Sam Hilliard and dropped to the ground after Joe caught Frank Schwindel’s flyball in the first inning of Game 1. Joe remained in the game after being checked by a trainer and was back in the lineup in the leadoff spot for the second game. … OF Raimel Tapia (toe sprain) will report to Triple-A Albuquerque this weekend for a rehab assignment and could return next week at Texas, Black said. Tapia has been on the 10-day injury list since Aug. 8.

Cubs: Ross doesn’t know when C Willson Contreras (sprained right knee) will be back behind the plate, but the two-time All-Star could be in the lineup as a DH this weekend against the crosstown White Sox.

UP NEXT

Rockies: LHP Kyle Freeland (4-6, 4.25 ERA) is scheduled to start on Friday at Los Angeles.

Cubs: RHP Keegan Thompson (3-3, 2.42) takes the mound when the Cubs travel across town to start a three-game series with the White Sox on Friday.

MORE NEWS: 'We're Back': Store Owner Reopens Chicago Sports On Michigan Avenue After 2020 Unrest

(© Copyright 2021 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)