 In July 1977, a border war broke out with Egypt, in which the Egyptians defeated Libya despite their technological inferiority.The conflict lasted one week before both sides agreed to sign a peace treaty that was brokered by several Arab states.Both Egypt and Sudan had aligned themselves with the US, and this pushed Libya into a strategic, although not political, alignment with the Soviet Union.