In 1959 , the islands became a territory within the Federation of the West Indies .