The IBF on Friday granted unified middleweight world champion Gennady Golovkin an exception to his mandatory defense to face late substitute Vanes Martirosyan, but with the stipulation that his next fight, should he defeat Martirosyan, has to come against Sergey Derevyanchenko if he wants to keep the belt.

Golovkin will face Martirosyan on May 5 (HBO, 11 p.m. ET/PT) at the StubHub Center in Carson, California instead of having a much-anticipated rematch with Canelo Alvarez on HBO PPV at the T-Mobile Arena in Las Vegas because Alvarez is under suspension by the Nevada State Athletic Commission for failing two drug tests in February for the banned performance-enhancing drug clenbuterol.

Only two of Gennady Golovkin's three world title belts will be on the line when he fights Vanes Martirosyan May 5. Nick Potts/PA via AP

Golovkin will defend his WBC and WBA belts against Martirosyan in a bid for his division record-tying 20th consecutive defense, but the IBF title won't be at stake because the organization declined to sanction the fight. The reasons the IBF cited are because Martirosyan (36-3-1, 21 KOs), 31, a 2004 U.S. Olympian from Glendale, California, is coming off a loss, he is a junior middleweight moving up in weight and he has not boxed in two years.

Once Alvarez, the WBC's mandatory challenger, was out of the fight on May 5, Derevyanchenko's team pressed for him to get his mandatory shot next, but Golovkin's side showed no interest in trying to make the fight -- even though the IBF was up next in the rotation system used by the sanctioning bodies to determine the order of mandatory bouts when there is a unified champion.

So the IBF could have stripped Golovkin for taking part in a fight against Martirosyan that it refused to sanction. But Golovkin promoter Tom Loeffler had the right to seek an exception and on April 20 he paid a $20,000 fee to the IBF for it to consider his request so GGG could face Martirosyan on May 5 without losing his belt. Unifying the four major titles has been Golovkin's quest for several years.

On April 25, attorney Alex Dombroff, representing Derevyanchenko co-promoter Lou DiBella, filed his response in which Derevyanchenko objected to the IBF issuing an exception.

On Friday afternoon, IBF president Daryl Peoples outlined the organization's ruling in a letter, a copy of which was obtained by ESPN.

Peoples wrote that on Friday the IBF's board of directors participated in a conference call during which the members discussed the issue.

"A majority of the directors determined that the exception to regulations should be granted to Gennady Golovkin with the following conditions," Peoples wrote.

And then he outlined the four terms under which the exception was granted.

Golovkin-Martirosyan must take place on or before May 5, 2018.

Golovkin must agree in writing before the fight that he will next fight the IBF middleweight mandatory within 90 days of the May 5 bout or by Friday, Aug. 3, 2018.

Golovkin must agree in writing before the May 5 fight "to indemnify, hold harmless and otherwise reimburse the IBF for any legal fees or other expenses related to the granting of this exception, including, but not limited to, the cost attendant to any resultant litigation."

Golovkin must "comply with all of the conditions set forth in the granting of this exception" or formal sanction won't be issued for the May 5 bout.

The IBF ruling is essentially a win for the Derevyanchenko camp, which never thought Golovkin would fight him on short notice on May 5. What it wanted was for the IBF to rule that Derevyanchenko (12-0, 10 KOs), 32, a 2008 Olympian from Ukraine, would get the shot at the IBF belt be it against Golovkin or a vacant title fight.

The IBF says Gennady Golvkin will have to fight Sergey Derevyanchenko (R) if he wants to keep that organizations' world title belt. Photo provided by Ed Diller/DiBella Entertainment

That means if Golovkin (37-0-1, 33 KOs), 36, a Kazakhstan native fighting out of Santa Monica, California, beats Martirosyan, as most expect he will do easily, and the rematch with Alvarez is rescheduled for Sept. 15, the date on which Alvarez plans to fight next once his suspension is lifted on Aug. 17, GGG would be stripped of the IBF title.

"We said all along that we didn't care if Golovkin walked into the ring with IBF title on May 5. What was at issue was what happens after that," DiBella told ESPN. "We made it clear that as long as GGG was ordered to fight Derevyanchenko immediately after the May 5 fight that was OK and that is what the IBF ruled.

"Golovkin isn't defending his IBF belt against Vanes and they're not sanctioning the fight with Vanes, but they are also not stripping Golovkin either. But GGG has to begin negotiations with us immediately thereafter and then fight Derevyanchenko within 90 days. There are no other exceptions. That's what we wanted the IBF to say."

DiBella said their side did not make a strong pitch to have Golovkin stripped before next week's fight because "we are empathetic to the fact that he didn't create this problem, Canelo did. But we are the IBF mandatory and we are entitled to the next fight. So if after the Vanes fight Golovkin does schedule a Canelo rematch next he has to give up the IBF title. My hope is that Gennady will fight Derevyanchenko next. But if he is going to fight Canelo on Sept. 15, give up the title and don't cause any further delays to Derevyanchenko's career. Derevyanchenko's dream is not to fight for a vacant title. It is to fight GGG for the belts. That is what he wants. But he also wants the opportunity he earned to make money and fight for a world title. He hopes it's against Golovkin."

Loeffler said he was not sure what Golovkin would decide to do. "Gennady is training for a fight on May 5, so haven't spoken to him about this approval of the exception yet," Loeffler said. "So when I see him in fight week I'll discuss it with him."