Libya has undergone a number of flag changes since it became independent back in 1951.
This country first was a monarchy, its respective flag was based on the black flag of Idris Es-Senussi. It had a crescent and star in the center and borders in the colors red and green. The flag was changed to the red, white and black colors of the Arab Liberation Movement after the revolution of '69 and then to the flag of the Federation of Arab Republics in 1972.
However, after Egypt's peace initiative towards Israel in 1977, Libya left the Federation and hoisted the present green colored flag from Libyan flag poles.