It followed months of painstaking behind-the-scenes negotiations at various levels. At one point, even the presidents of the two nations were involved, as Russian President Vladimir Putin discussed the matter with his Ukrainian counterpart, Volodymyr Zelensky over the phone.