"Polish-Lithuanian Background:" By about 1362 (Battle of Blue Waters) most of northwest Ukraine (including Kyiv) had fallen to Lithuania. In 1385 (Union of Krewo) the crowns of Poland and Lithuania were joined into the Polish-Lithuanian Commonwealth and Lithuania became Christian, the last European country to do so. In 1569 (Union of Lublin), during the Livonian War, a closer union was made and most of Ukraine was transferred from Lithuania to Poland. In 1596 (Union of Brest) an attempt was made at church union. The Orthodox would retain their rites and married clergy while accepting the doctrinal supremacy of the Pope. Since some Orthodox rejected this, the effect was to create three churches instead of two. From about 1610 the Orthodox and Zaporozhian Cossacks became more closely allied, thereby increasing the alienation of both from Poland. From about 1637 there were rebellions in the eastern lands which led to a movement of population into Russian territory south of the Belgorod Line (Sloboda Ukraine).