A frenetic rally against Aroldis Chapman, over 500 pitches, a major league record record 48 total strikeouts and six hours of play still conspired to end with the Cubs getting swept.

Starlin Castro’s go-ahead infield single in the top of the 18th inning sent the Cubs to a 5-4 defeat to the New York Yankees Sunday night into Monday morning in front of 40,584, most of whom had left the frigid late-night conditions of Wrigley Field by the end of the game.

The Cubs were equal parts disappointed and delirious after losing this two-day marathon. The game didn’t just border on ridiculous; it was ridiculous, and that was the sense as the clubhouse TVs read, almost laughably, “Bus at 2:15” for the team’s ride to the airport for their overnight flight to Denver.

“We lost but you gotta try to have fun with it,” first baseman Anthony Rizzo said.

“… Games like this could definitely bring both sides together. I know they won, the Yankees, but both teams are I think going to be better off just coming together as a unit. And yeah, we came back, we battled back against one of the best closers in the game, we scratched through three runs off of him and made it interesting.”

It was a game that didn’t appear destined for anything special for most of the evening, as the Cubs had just a four percent chance of winning (according to FanGraphs’ win expectancy) when Chapman took the mound with a 4-1 lead in the ninth.

The Cubs’ rally started with Russell drawing a leadoff walk and Jon Jay flipping a single into center. After Willson Contreras struck out, Albert Almora Jr.’s RBI single in the ninth inning off brought Baez to the plate as the winning run. Baez worked a solid at-bat against Chapman and lined a two-strike single to left to score Jay and bring the Cubs within one, and later took second to get in scoring position as the winning run.

After Kyle Schwarber struck out, Bryant was intentionally walked after Chapman fell behind the Cubs’ third baseman 3-1. That brought up Rizzo, who feebly struck out as the tying run in the eighth inning against right-hander Dellin Betances and had two hits in his last 31 at-bats.

But Chapman drilled Rizzo with a 98.9 mile per hour fastball on the first pitch of the at-bat, bringing the tying run to the plate. That gaffe knocked Chapman out of the game, and right-hander Tyler Clippard retired Ben Zobrist to keep the score knotted at four.

“To come back and get it tied against Aroldis, bully for us,” manager Joe Maddon said. “Those were some really good at-bats right there. And then of course, culminating in a hit by pitch. That’s not easy to do to get three runs against that fellow in these circumstances.”

From there, the game devolved into mostly strikeouts and popouts. The first 10 batters of extra innings all struck out, and a total of 25 batters whiffed or were called out on strikes from innings 10-18. Cubs players popped out five times, too.

“I know they’re good, their pitchers are, but we have to do better than that,” Maddon said. “We have to make adjustments. We were not making adjustments. You’ve seen it before happen to us tonight, you’ve seen other major league games get into extra innings like that, guys have a tendency to try to do too much, and then you start not getting your hits and everybody’s trying to end the game with a home run. We just gotta try to piece it together.”

The Cubs had a chance to end things in the 12th, with Rizzo leading that frame off with a double. He advanced to third on Miguel Montero’s deep flyout to left, but former Cubs right-hander Adam Warren struck out Russell and got Contreras to ground out to first to end the inning.

The Yankees finally pulled ahead in the 18th when Aaron Hicks bunted and advanced to second on Contreras’ throwing error. Ronald Torreyes then bunted Hicks to third, and the speedy outfielder scored when a drawn-in Russell couldn’t hurry a throw home on Starlin Castro’s sharp ground ball. Pedro Strop took the loss.

Baez grounded out, Schwarber struck out and after Bryant walked, Rizzo was intentionally walked to bring pinch hitter Kyle Hendricks to the plate. Hendricks, the third Cubs pitcher to pinch hit (along with Jake Arrieta and John Lackey), struck out to end the game.

The previous high for combined strikeouts at Wrigley Field was set on May 31, 2003, when the Cubs and Houston Astros combined for 37 strikeouts. The major league record was 43 strikeouts between two teams, which was set in a 20-inning California Angels-Oakland A’s game in 1971.

“A crazy game,” Maddon said. “It would’ve been nice to have won it.”