The French Territory of the Afars and the Issas became Djibouti in 1977 .