After weeks of bitter negotiations, an agreement is in place for Gennady Golovkin and Sergiy Derevyanchenko to fight on Oct. 5 at the Garden for the vacant IBF middleweight championship, according to ESPN.

The deal was officially completed Wednesday, per ESPN, with a news conference set for Thursday.

Canelo Alvarez was stripped of the title earlier this month for failing to finalize a title bout against Derevyanchenko. Golovkin was next in the IBF rankings, and he and Derevyanchenko had until Sept. 4 to strike a deal.

Golovkin, 37, was hoping for a third fight with Alvarez, who’s responsible for the only two blemishes on Golovkin’s 39-1-1 record. He drew with Alvarez in 2017 and took a majority-decision loss last September. Golovkin last fought in June at MSG, knocking out Canadian Steve Rolls.

Derevyanchenko, 33, is 13-1 and last fought in April, defeating German Jack Culcay by unanimous decision. Derevyanchenko loss a split-decision to Daniel Jacobs last October in an IBF middleweight title bout. Jacobs then lost the title to Alvarez in May.