Subsequent evolution of the state was shaped by contact with the British and Dutch colonists from Cape Colony. Missionaries invited by Moshoeshoe I developed orthography and printed works in the Sotho language between 1837 and 1855. The country set up diplomatic channels and acquired guns for use against the encroaching Europeans and the Korana people. Territorial conflicts with both British and Boer settlers arose periodically, including Moshoeshoe's notable victory over the Boers in the Free State–Basotho War, but the final war in 1867 with an appeal to Queen Victoria, who agreed to make Basutoland a British suzerainty. In 1869, the British signed a treaty at Aliwal with the Boers that defined the boundaries of Basutoland and later Lesotho, which by ceding the western territories effectively reduced Moshoeshoe's kingdom to half its previous size.