 A 1985 prisoner-exchange agreement between Bulgaria and Libya was the legal instrument used for the transfer; technically Libya did not free the medics but rather allowed them to serve their sentences in Bulgaria.On landing in Sofia, however, they were pardoned by the Bulgarian President, Georgi Parvanov.The French President said that "some humanitarian mediation" by the "friendly" government of Qatar was decisive in helping with the release of the medics.