In the end, unified middleweight world champion Gennady Golovkin and Canelo Alvarez worked out an agreement on Wednesday for their much-anticipated rematch on Sept. 15 at the T-Mobile Arena in Las Vegas, but it was a wild day getting it across the finish line.

Two hours after the Golden Boy Promotions-imposed 12 p.m. PT deadline for Golovkin to accept an improved offer under which Alvarez would get the lion’s share of a 57½-42½ revenue split came and went with Golden Boy CEO Oscar De La Hoya telling ESPN “there is no fight,” the sides came up with last-ditch idea that convinced GGG to accept the terms.

“I’m happy to inform that we have a fight September 15!!!!,” De La Hoya tweeted.

After De La Hoya called ESPN to say the deadline had past and there was no fight, things suddenly changed and the window for a deal to be finalized had opened just a crack. Moments after speaking at length with ESPN about there not being a deal and saying that negotiations were “100 percent over,” one of De La Hoya’s associates called ESPN back.

“Hold on,” the associate said.

As it turned out that while De La Hoya on the phone talking to ESPN, what was termed as a “Hail Mary” idea to save the fight was being discussed between Golden Boy president Eric Gomez and others involved in the fight and then communicated to Golovkin’s team.

“Still working on it,” Golovkin promoter Tom Loeffler texted to ESPN 20 minutes after the deadline as he scrambled to see if Golovkin, who is in Moscow as a guest of one his sponsors for the World Cup, was interested in the newest proposal.

That “Hail Mary” worked because now there is going to be rematch of that is perhaps the biggest fight in boxing. Golovkin and Alvarez met last September, also the T-Mobile Arena, the same site where the rematch will take place, and fought to a heavily disputed draw that most thought Golovkin won.

The fight generated 1.3 million pay-per-view buys and a $27 million gate – the third-biggest in boxing history. Most project that a rematch would beat both figures and that Golovkin would earn more than $40 million.

Alvarez received the lion’s share of a 70-30 revenue split for that fight and when the rematch was set for May 5 Alvarez was due to receive the lion’s share of a 65-35 split. But when Alvarez (49-1-2, 34 KOs) failed two drug tests in February for the performance-enhancing drug clenbuterol and was suspended for six months by the Nevada State Athletic Commission the rematch was canceled and the fighters traded harsh words. Golovkin instead faced short-notice replacement Vanes Martirosyan in Carson, California, wiped him out in two rounds and made about $1 million instead of the roughly $25 million he would have made had the rematch taken place as scheduled.

But they then turned their attention to trying to put the rematch back together for the fall and cleared a major hurdle when Alvarez signed up for year-round Voluntary Anti-Doping Association testing 24/7/365.

However, weeks later Golovkin (38-0-1, 34 KOs) had a change of heart and insisted on redoing what De La Hoya said was a signed contact. Golovkin demanded 50-50 split. De La Hoya eventually increased Golovkin’s share to 40 percent, but GGG continued to stand firm on parity, at which point De La Hoya declared that the “Canelo train has left the station” and that he was moving on to try to close a deal for the fight with Daniel Jacobs (34-2, 29 KOs), a former secondary titlist who had given GGG a very tough fight in a close decision loss in March 2017.

That declaration from De La Hoya got Golovkin to lower his demands to 55-45. But Golden Boy would not give him that much, instead agreeing to split the difference at 57½-42½ and giving him Wednesday’s deadline, which came and went but with there still being some hope because deadlines in boxing are usually not carved in stone.

When it appeared that the fight was dead on Wednesday afternoon, De La Hoya gave his view, telling ESPN, “We want the fight, Tom Loeffler wants the fight. Clearly, the only person here who doesn’t want the fight is GGG. The fans want the fight. We bent over backwards. GGG says he’s a fighter not a business man and he’s right. He’s no businessman because he doesn’t understand numbers. It’s 100 percent over. We’ve been trying to make the numbers work and Canelo finally said, ‘screw this guy.’ We’ve come off our 35 percent. We’ve come off our contract that we had signed a couple of months ago and we still moved our percentage to make Golovkin happy but clearly he doesn’t want the fight.

“Tom and Eric have been on the phone until right now and Eric just told me we have no deal. 100 percent there is no fight. We’ve come up on our offer and there’s no budge from him so there’s no fight. That’s it. There’s no fight. We’re moving on. We have deadlines.” But it’s boxing, where deadlines are as fluid as the water a boxer drinks between rounds.