Pakistan has released 17 former Guantanamo Bay detainees who had been freed from U.S. custody nine months ago and detained for further investigation on their return to Pakistan .