With preceding legal institutions abolished, Gaddafi envisioned the Jamahiriya as following the Qur'an for legal guidance, adopting sharia law; he proclaimed "man-made" laws unnatural and dictatorial, only permitting Allah's law. Within a year he was backtracking, announcing that sharia was inappropriate for the Jamahiriya because it guaranteed the protection of private property, contravening The Green Book's socialism. His emphasis on placing his own work on a par with the Qur'an led conservative clerics to accuse him of shirk, furthering their opposition to his regime. In July, 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. That year, Gaddafi was invited to Moscow by the Soviet government in recognition of their increasing commercial relationship.