Dan Rafael details how unlikely a rematch between Canelo Alvarez and Gennady Golovkin was looking until a late deal was reached. (1:18)

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 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, and with Golden Boy CEO Oscar De La Hoya telling ESPN "there is no fight," the sides came up with a 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.

I'm happy to inform that we have a fight September 15!!!! #CaneloGGG2

Feliz De informar que si tenemos pelea Septiembre 15!!! #CaneloGGG2 pic.twitter.com/gI3QmR0eXe — Oscar De La Hoya (@OscarDeLaHoya) June 13, 2018

Terms of the agreement, which still need to be put to paper and signed, were not disclosed.

"It was a dead deal at noon. We were going to proceed with a Billy Joe Saunders fight. We had a deal in place to fight Billy Joe Saunders at the end of August," Golovkin promoter Tom Loeffler told ESPN of a match with world titleholder Saunders. "We definitely had an agreement in place with Billy Joe Saunders. I was up front with them and told them if there's a way to get the Canelo deal that was a priority, but Gennady had no hesitation fighting Billy Joe Saunders because he felt it was a challenging fight to fight an undefeated champion."

After De La Hoya called ESPN to say the deadline had passed and there was no fight, saying that negotiations were "100 percent over," things suddenly changed and the window for a deal to be finalized had opened a crack. Moments later, one of De La Hoya's associates called ESPN back.

"Hold on," the associate said.

As it turned out, while De La Hoya was 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," 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 of his sponsors for the World Cup, was interested in the newest proposal.

Gomez said he was trying to reach De La Hoya during his interview with ESPN and he was frustrated because he wasn't answering his phone. But ultimately, Gomez said, "We threw a Hail Mary and it was caught. The fight's done."

Now there is going to be a rematch that is perhaps the biggest fight in boxing. Golovkin and Alvarez met last September at 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.

Neither side would disclose what the "Hail Mary" was, but executives from the MGM Grand, the host casino for the fight whose parent company owns T-Mobile Arena, got involved and came up with a tweak that helped get the deal done.

"Gennady stuck to his guns," Loeffler said. "He always wanted the Canelo rematch, but at the same time, he wanted the respect as the champion, especially with what happened with the May 5 cancellation. We figured out a way to get it done. After the fight was dead, we figured out a way to resuscitate it. They were moving on and we were moving on. I can't go into the details, but Gennady is satisfied with the deal. Both fighters were stuck and we needed one of our partners to get involved and the MGM did. That's how the deal was saved. We came up with the solution.

"Gennady is happy he is getting the respect, and I'm happy we're able to participate in the biggest fight in the sport of boxing. This goes to Gennady's legacy. It's a huge fight for both guys. I think it's going to be a much bigger promotion than first time out."

Alvarez received the lion's share of a 70-30 revenue split for their first 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 contract. Golovkin demanded a 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.

When it appeared that the fight was dead on Wednesday afternoon, De La Hoya told 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 businessman, 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.