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.

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.

CLICK HERE FOR MORE SPORTS COVERAGE ON foxnews.1eye.us

"I think we just kept persevering," McMahon said. "It was a grinder of a day for everybody. I'm glad it's over and we got the win.

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

"It honest just felt real good to come though," McMahon said. "I've been bumping and grinding out there. Then (Rodgers) can through with a huge double, too."

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.

"Connor gave us the big boost with the grand slam," manager Bud Black said. "He's been giving us good at-bats. That was a huge swing for the team and a time when we needed it,"

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.

"He's still growing," manager David Ross said. "I think there is a huge upside potential, but tonight I don't think he was at his best."

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.

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.

NEVER ENDING STORY

Story left the game in the 10th with what Black termed a leg injury after he ran to first on a groundout.

Rodgers moved from second base to shortstop, starting a series of defensive changes for the Rockies.

After LH reliever Kyle Freeland pinch hit in the 10th for Bowden and got a bunt single, he played right field in the bottom of the 10th. Freeland didn't touch the ball.

"He was 1 for 1 as a pinch hitter and played great defense," Black said.

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.